Re: Retrieving "default" defaults after registerDefaults?
Re: Retrieving "default" defaults after registerDefaults?
- Subject: Re: Retrieving "default" defaults after registerDefaults?
- From: Doug Brown <email@hidden>
- Date: Sun, 7 Apr 2002 19:16:36 -0700
On Sunday, April 7, 2002, at 06:50 PM, Matt Gemmell
<email@hidden> wrote:
Have you tried this?
[[NSUserDefaults standardUserDefaults]
removeObjectForKey:@"DefaultsKey"];
Hi Doug,
Thanks for your reply. :)
I noticed that method in the NSUserDefaults documentation; the reason I
didn't want to use it is that the user can cancel my preferences window
(click the Cancel button instead of the OK button), presumably
intending to
discard any changes they've made - including having clicked the Factory
Settings button. Using the registered "default" defaults means I can
revert
to the user's previous settings without needing to keep track of their
old
settings manually (actually, without any code at all!)
Ahh, very good point, I never thought about the cancel button. Glad to
see you got it working! :-)
Doug
_______________________________________________
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.