Re: Multiple instances of [NSUserDefaults standardUserDefaults]
Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- From: Kyle Sluder <email@hidden>
- Date: Sat, 23 Oct 2010 17:15:58 -0700
On Sat, Oct 23, 2010 at 2:20 PM, Chris Idou <email@hidden> wrote:
>
>
> Some stuff on the net seems to indicate that NSUserDefaults does support KVO. If
> it doesn't, how would NSUserDefaultsController accurately notify of all changes
> to NSUserDefaults? Or maybe one has to always access it
> through NSUserDefaultsController to get consistent notifications? In which case,
> it kind of seems pointless that they are two separate classes.
I believe NSUserDefaults's KVO support is accidental/a private
implementation detail. Either way, it's not documented in the
NSUserDefaults documentation, so you can't rely on it.
As for how NSUserDefaultsController works, who knows? Who cares? For
all we know, it just polls NSUserDefaults. Or maybe there's a private
notification. Or NSUserDefaults is KVO-compliant for the purpose of
making NSUserDefaultsController work.
--Kyle Sluder
_______________________________________________
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