Re: NSUserDefaults stickyness
Re: NSUserDefaults stickyness
- Subject: Re: NSUserDefaults stickyness
- From: Chris Kane <email@hidden>
- Date: Sat, 16 Feb 2002 11:36:37 -0800
On Thursday, February 14, 2002, at 04:16 PM, Michael Peirce wrote:
On Thursday, February 14, 2002, at 05:47 PM, Alex Keresztes wrote:
Have your companion app do a call
[NSUserDefaults resetStandardUserDefaults] (not sure if that is
correct -- look it up in docs)
before every read of the user defaults. The problem is that when the
nsuserdefaults object is created for an
app it is cached, and so any changes to the defaults will not be
noticed until the cache is reread,
which is what reset does.
This does the trick! Much thanks Alex.
Another case of the dreaded "Description forthcoming":
resetStandardUserDefaults
+ (void)resetStandardUserDefaults
Description forthcoming.
-sychronize is a much more dainty hammer, and is documented.
Chris Kane
Cocoa Frameworks, Apple
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.