Re: Multiple instances of [NSUserDefaults standardUserDefaults]
Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- Subject: Re: Multiple instances of [NSUserDefaults standardUserDefaults]
- From: Zach Drayer <email@hidden>
- Date: Sat, 23 Oct 2010 19:52:20 -0500
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 [NSUserDefaultsstandardUserDefaults] in several
> places in my app, and getting a different result! This is causing me problems.
>
> I'm using a plugin architecture, so I'm guessing this has something to do with
> it, but even so, I haven't seen anything like this happen before as far as being
> multiple instances of global variables.
>
> Has anyone got any thoughts?
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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