Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mdeh

macrumors 6502
Original poster
Jan 3, 2009
345
2
Hi all
I am looking for help with this, possibly am using the wrong approach. The setting is as follows.
1) I register a "Factory" default (in this case the index of an initial popUpButton (an NSNumber)) for a key.

2) In the xib, an NSArrayController's content binds to an NSArray.

3) In the Xib, the popUp Button's content Values binds to the "arrangedObjects" of the controller.

4) In the Xib, the popUP Button's selectedIndex binds to the Shared User defaults controller whose modelKeyPath is the key in (1) above.

All this works as expected. The initial popUP is the "Factory" value, and subsequent values of the popUPButton are the last value chosen before quitting.

Now...I would like to access the current value of the popUpButton. Prior to binding to the userDefaultsController, I had bound the button's selectedValue to a property in the controller.m file. Currently this is not possible, as binding the selectedIndex disables the selectedValue.
I am sure this is not a new problem, but what approach would those who work with bindings suggest.
(What I am after is once the user has selected a particular popupButton value, this be reflected in a model "property").
thanks in advance.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.