Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Zach Drayer
Have you tried calling -synchronize before accessing user defaults to get a value (or after accessing them to set a value)? It should force a synchronization of all the defaults to disk. - Zach On Oct 23, 2010, at 5:47 AM, Chris Idou wrote: > > > I'm printing out the address of [NSUserDefaul

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Kyle Sluder
On Sat, Oct 23, 2010 at 2:20 PM, Chris Idou 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 NSUs

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Chris Idou
which case, it kind of seems pointless that they are two separate classes. - Original Message From: Dave Keck To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Sat, 23 October, 2010 10:48:01 PM Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults] > Well, I

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Dave Keck
> Well, I've got some code, which I presume used to work, which relies on > observing a value in the user defaults. The observer isn't getting triggered, > so > I am guessing it is because they are separate instances. Both should be on the > main thread. Are you observing an instance of NSUserDef

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Chris Idou
Dave Keck To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Sat, 23 October, 2010 10:05:01 PM Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults] > Has anyone got any thoughts? I wouldn't be surprised if there's a separate NSUserDefaults instance for each th

Re: Multiple instances of [NSUserDefaults standardUserDefaults]

2010-10-23 Thread Dave Keck
> Has anyone got any thoughts? I wouldn't be surprised if there's a separate NSUserDefaults instance for each thread. Regardless though, it's an implementation detail that shouldn't be relied on unless the docs guarantee certain behavior. Could you explain why you need to rely on NSUserDefaults r