• 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
'Factory values' and NSUserDefaultsController + NSUserDefaults not syncing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'Factory values' and NSUserDefaultsController + NSUserDefaults not syncing...


  • Subject: 'Factory values' and NSUserDefaultsController + NSUserDefaults not syncing...
  • From: Steven Kramer <email@hidden>
  • Date: Mon, 6 Jun 2005 21:01:21 +0200



Well, this is going to get lost in the Intel tidal wave... let's try anyway...

The situation is that I'm trying to do a 'factory values' reset of the user's preferences. The problem is that I am having a hard time syncing the values of NSUserDefaults with those in NSUserDefaultsController. Right now, when doing a reset, several controls bound to NSUserDefaultsController don't update. It looks like a classic case of 'changing content behind the controller's back'.

Currently, my reset code looks like this:

NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
[defaults synchronize];
[[NSUserDefaultsController sharedUserDefaultsController] revertToInitialValues: nil];
[defaults setPersistentDomain: [NSMutableDictionary dictionaryWithCapacity: 20] forName: [[NSBundle mainBundle] bundleIdentifier]];
[defaults synchronize];
[[NSUserDefaultsController sharedUserDefaultsController] revertToInitialValues: nil];


As you can see, I've already been trying hard to fix this. No luck until now, unfortunately.


Regards,

Steven Kramer

--
email@hidden
http://www.sprintteam.nl/

_______________________________________________
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


  • Prev by Date: Re: Where to find _objc_insertMethods
  • Next by Date: Re: NYT confirms rumor of Apple switch to Intel
  • Previous by thread: Re: NSOutlineview, data changing from outside the outlineview's events
  • Next by thread: OT: Survey facing design patterns and communication
  • Index(es):
    • Date
    • Thread