I hope to express myself with appropriate terms.
I have three entities: customer, country, state. Between country and state, there are two relationships. So I can create a number of countries and select one of these I can create a number of states that belong to it.
For creating the interface of the entity "customer" I put threeNSPopUpButton's
:
My problem is that I can not pass data through the chosenNSPopUpButton
entity "customer". The NSPopoUpButton works by binding:
What can I do to ensure that the data selected by the three NSPopUpButton's
are recorded in the appropriate fields of the entity "customer"?
It would seem that using 3 popups may work with your problem here, as you can return the int for each selected item, and then pass that information on to the next button press.
So, when they press 'country', return back the country id, and put that in your customer entity.
Then, when they press state, pass the country to this popup, and show the states, and pass the state id back, and do the same for city.
This way you don't have lots of managed objects around, as you really don't need the data, you just need the id, and perhaps the name, to show to the user, and these can be passed back in a notification back to your controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With