• 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
removing all user defaults from prefs file and 'memory'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

removing all user defaults from prefs file and 'memory'


  • Subject: removing all user defaults from prefs file and 'memory'
  • From: Nicolas Berloquin <email@hidden>
  • Date: Sat, 21 May 2005 22:16:34 +0200

Hello !

I'm having some problems with preference files that seem to be corrupted.
In that case, I'd like to be able to both :
- trash/remove/empty the prefs file itself (either solution).
- reset the userdefaults for the current session to my registered defaults (probably inside
my app's Initialize method, right after I register my defaults), and make sure that cocoa
doesn't cache the hosed data in my back.


I've seen +resetStandardUserDefaults but I'm not sure that it applies to the file itself.
Can I safely erase the prefs file and assume it will be recreated if the user goes to the
prefs window and makes changes, without quitting the app first ?
Would there be another call I missed that does all I want to accomplish in one go ?


I could call removeObjectForKey: with all my known keys, but it doesn't feel right...

thanks !

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: removing all user defaults from prefs file and 'memory'
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: AddressBook-like TextFields?
  • Next by Date: Re: Strategy for using common classes in multiple Cocoa plug-ins?
  • Previous by thread: Re: Waiting for Event
  • Next by thread: Re: removing all user defaults from prefs file and 'memory'
  • Index(es):
    • Date
    • Thread