• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multiple instances of [NSUserDefaults standardUserDefaults]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Multiple instances of [NSUserDefaults standardUserDefaults] (From: Chris Idou <email@hidden>)
 >Re: Multiple instances of [NSUserDefaults standardUserDefaults] (From: Dave Keck <email@hidden>)
 >Re: Multiple instances of [NSUserDefaults standardUserDefaults] (From: Chris Idou <email@hidden>)
 >Re: Multiple instances of [NSUserDefaults standardUserDefaults] (From: Dave Keck <email@hidden>)
 >Re: Multiple instances of [NSUserDefaults standardUserDefaults] (From: Chris Idou <email@hidden>)

  • Prev by Date: Why are spaces in the source directory's name killing device builds but not simulator builds?
  • Next by Date: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
  • Previous by thread: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
  • Next by thread: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
  • Index(es):
    • Date
    • Thread