Defaults not sync'ing?
Defaults not sync'ing?
- Subject: Defaults not sync'ing?
- From: Joachim <email@hidden>
- Date: Wed, 28 Dec 2005 20:54:24 -0800
I have a system prefs pane which writes its settings to the defaults
database using the code below. It then notifies another process about
the change, but when that process reads the dictionary, it is the
previous, cached, version that is being read.
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
NSDictionary *prefs = [[NSDictionary alloc] initWithObjectsAndKeys:
Object-1, @"Key-1",
...
Object-n, @"Key-n",
nil];
[defs removePersistentDomainForName:bundleId];
[defs setPersistentDomain:prefs forName:bundleId];
[defs synchronize];
I've checked that the values are written correctly to the plist file
and that the sequence of events is correct. What am I doing wrong?
I'm on Tiger, Xcode 2.2.
Thanks in advance,
Joachim
_______________________________________________
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