• 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: NSUserDefaults question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • [solved]: NSUserDefaults question
      • From: Peter Schmidt <email@hidden>
References: 
 >NSUserDefaults question (From: Peter Schmidt <email@hidden>)

  • Prev by Date: Re: No MainNibFile causes buttonPressed error message
  • Next by Date: combo box questions
  • Previous by thread: NSUserDefaults question
  • Next by thread: [solved]: NSUserDefaults question
  • Index(es):
    • Date
    • Thread