English 中文(简体)
核心数据集值,有三个相关的NSPopUpButton
原标题:Set value in CoreData with three related NSPopUpButton

我希望以适当的措辞表达自己的意见。

我有三个实体:customer,country,state。 在country和state之间,有两种关系。 因此,我可以创建若干国家<>,其中之一可产生属于该国家的若干国家<>。

为创建实体“客户”接口,我提出了三条<代码>。 NSPopUpButton s

  • The first selects the country,
  • The second shows the states related to the selected country.
  • The last shows the zip code related to the chosen state.

我的问题是,我无法通过选定的<代码>NSPopUpButton实体“customer”通过数据。 The NSPopoUpButton work by binding:

  • Content (bind to:country, arrangedObjects),
  • Content Values (bind to:country, arrangedObjects, model key:country),
  • Selected Index (bind to:country, selectionIndex).

我可以做些什么来确保三个<代码>NSPopUpButton s选择的数据在实体“客户”的适当领域记录?

问题回答

看来,使用3人可以在这里与你的问题一起工作,因为你可以回头处理每个选定的项目,然后将有关这一信息传给下顿报。

因此,当他们向国家发出警告时,他们回国,并将之置于你的客户实体。

然后,当他们报界时,他们把国家赶到这个人群中,向各州展示,让国家回来,城市也是如此。

这样,你们不会有太多左右的有管理的物体,因为你确实不需要数据,你才需要向用户展示,或许需要名称,并且可以在通知中转回你的控制员。





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签