Re: storing default preferences
Re: storing default preferences
- Subject: Re: storing default preferences
- From: cauri <email@hidden>
- Date: Sun, 14 Mar 2004 23:18:46 +0100
Thank you. That works great.
-cauri
On Mar 14, 2004, at 22:17, Charles Srstka wrote:
You can just keep a plist called "defaults.plist" in your app's
bundle, and get it like this:
+ (void)initialize {
NSString *defaultsPath = [[NSBundle mainBundle]
pathForResource:@"defaults" ofType:@"plist"];
NSDictionary *defaults = [NSDictionary
dictionaryWithContentsOfFile:defaultsPath];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
}
That should make it pretty easy to tweak your app's default values.
Charles
On Mar 14, 2004, at 2:27 PM, cauri wrote:
Thank you, however the first time the application runs, before the I
write the plist file, I need to store the initial data for those
preference lists (arrays) somewhere. What is the best method?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.