Re: Resetting "Factory" Prefs
Re: Resetting "Factory" Prefs
- Subject: Re: Resetting "Factory" Prefs
- From: "Clark S. Cox III" <email@hidden>
- Date: Wed, 6 Feb 2002 17:33:44 -0500
On Wednesday, February 6, 2002, at 04:33 , Tony Cate wrote:
I registered the defaults:
[[NSUserDefaults standardUserDefaults] registerDefaults: defaultValues];
My preference panel changes the defaults. (Very easy to do.)
But when I try to reset the prefs I ended up doing this:
[[NSUserDefaults standardUserDefaults] removeObjectForKey:someKey];
While it works, it strikes me as being incorrect.
What seems incorrect about that? You are simply saying: "The user no
longer has a preference for this particular key". This means that the next
time you fetch the preference for that particular key, the default one
will be returned.
--
Clark S. Cox, III
email@hidden
http://www.whereismyhead.com/clark/
_______________________________________________
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.