|Aug 27, 2013, 11:47 PM||#1|
NSUserDefaults, Bindings, NSPopup Button Question
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.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|textfield value not getting saved to nsuserdefaults||abcdefg12345||Mac Programming||5||May 8, 2014 06:43 PM|
|Mophie Juice Pack Plus (iPhone 5) Question - Mute Button Question||JulesK||iPhone Accessories||3||Mar 30, 2014 02:58 PM|
|Bindings question: default value||Qaanol||Mac Programming||4||Nov 20, 2013 12:15 PM|
|NSUserDefaults(Controller)||davidmirv||Mac Programming||3||Apr 17, 2013 03:29 PM|
|NSCoding/NSUserDefaults||nashyo||iPhone/iPad Programming||5||Jun 25, 2012 05:41 AM|
All times are GMT -5. The time now is 11:23 PM.