Re: Forcing NSUserDefaults being written to disk?
Re: Forcing NSUserDefaults being written to disk?
- Subject: Re: Forcing NSUserDefaults being written to disk?
- From: Pierre-Olivier Latour <email@hidden>
- Date: Thu, 09 Jan 2003 02:04:16 -0800
>
There is likely no domain being specified to use to store the
>
defaults in. Normally this is picked out of the Info.plist key
>
CFBundleIdentifier in the application wrapper.
Unfortunately, there is one and it works, because if I do this before
calling synchronize:
[defaults setBool:[defaults boolForKey:kKey_LogFile] forKey:kKey_LogFile];
A default file is then saved to disk, but contains only the key
kKey_LogFile.
So obviously, synchronize only saves the keys that have been "touched" since
the defaults were registered. That's understandable, but I don't think this
is what the doc says i.e. defaults should be written to disk even if they
have not been updated.
>
You need to set the identifier in the target of your application..
>
unless it is a wrapperless tool.. Instead you're going to have to set
>
the domain programmatically.
Maybe I could workaround the problem with that - who knows... How would you
do this?
_____________________________________________________________
Pierre-Olivier Latour email@hidden
Palo Alto, USA
http://www.pol-online.net
_______________________________________________
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.