Re: NSUserDefaults question
Re: NSUserDefaults question
- Subject: Re: NSUserDefaults question
- From: Scott Anguish <email@hidden>
- Date: Sat, 6 Jul 2002 17:29:44 -0400
On Thursday, July 4, 2002, at 05:35 PM, Peter Schmidt wrote:
Hello,
how can I reset my user defaults to the standard-settings?
"[NSUserDefaults resetStandardUserDefaults];" does'nt work.
You mean in the fashion of having a "default settings" button? To
do that you need to have a copy of the default settings someplace, and
then put them back into the defaults database.
usually I store the 'default settings' in an NSDictionary in the
wrapper, and then I initially register them using registerDefaults:..
then you'd need to copy the values out of of the dictionary and into
the defaults to restore the defaults
resetStandardUserDefaults does a synchronize, and then releases the
user defaults instance.
_______________________________________________
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.