Re: What writes out a pref file?
Re: What writes out a pref file?
- Subject: Re: What writes out a pref file?
- From: Jim Correia <email@hidden>
- Date: Thu, 14 Apr 2005 18:05:04 -0400
On Apr 14, 2005, at 6:01 PM, Mark Dawson wrote:
I added the following code to my +initialize method for my
appController:
NSMutableDictionary *dict;
NSUserDefaults *defaults;
defaults=[NSUserDefaults standardUserDefaults];
dict=[NSMutableDictionary dictionary];
[dict setObject:[defaults objectForKey:@"AppleMeasurementUnits"]
forKey:@"MyMeasurements"]; // starts out the same as
AppleMeasurementUnits
[defaults registerDefaults:dict];
However, I don't see the above key in my "com.appName.plist" file in
my ~/Library/Preferences/ folder (the last mod date is yesterday).
What do I need to do to write out new values? From what I could tell,
launching and quitting should write it out, right? Or do I need to
call something like synchronize?
You just registered defaults. They aren't written back, but are the
fallback values for keys not in the prefs file.
Jim
_______________________________________________
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