• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resetting "Factory" Prefs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Resetting "Factory" Prefs (From: Tony Cate <email@hidden>)

  • Prev by Date: Re: Newbie Resources
  • Next by Date: Re: NSMovie and resizing (matrix fun)
  • Previous by thread: Resetting "Factory" Prefs
  • Next by thread: Re: Resetting "Factory" Prefs
  • Index(es):
    • Date
    • Thread