'Factory values' and NSUserDefaultsController + NSUserDefaults not syncing...
'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