Re: [Solved] Using key-value observing on NSUserDefaults
Re: [Solved] Using key-value observing on NSUserDefaults
- Subject: Re: [Solved] Using key-value observing on NSUserDefaults
- From: Greg <email@hidden>
- Date: Sun, 6 Jul 2008 18:13:43 -0400
Silly me, I needed to observe the controller itself, not the values...
duh! :-p
[[NSUserDefaultsController sharedUserDefaultsController]
addObserver:self
forKeyPath:[@"values." stringByAppendingString:preferenceKey]
options:NSKeyValueObservingOptionNew
context:NULL];
- Greg
On Jul 6, 2008, at 4:18 PM, Greg wrote:
I have a preferences controller (PreferencesController) that
controls a preferences window. It would be quite nice if I could
observe changes to all of the preferences via key-value observing.
In IB I also have an NSUserDefaultsController that's hooked up to
all the controls, I've tried observing its 'values' but that doesn't
seem to work.
Thanks,
- Greg
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
@kinostudios.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden