Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 27, 2013, 11:47 PM   #1
mdeh
macrumors 6502
 
Join Date: Jan 2009
NSUserDefaults, Bindings, NSPopup Button Question

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.
mdeh is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:57 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC