Re: NSUserDefault at first startup
Re: NSUserDefault at first startup
- Subject: Re: NSUserDefault at first startup
- From: Carlos Weber <email@hidden>
- Date: Sat, 4 Oct 2003 10:48:29 -1000
On Oct 4, 2003, at 09:18, David Dauer wrote:
Hello all
I have a NSMutableArray *array; and assign this array a dictionary.
NSUserDefaults *defaults;
defaults = [NSUserDefaults standardUserDefaults];
array = [[defaults objectForKey:@"key"] retain];
But when the user start my app the first time, the array is (NULL) and
it's
not possible to set any dict or object to the array.
How to fix that?
Thanks
David
Check out the User Defaults documentation on your disk:
file:///Developer/Documentation/Cocoa/Conceptual/UserDefaults/index.html
A description of what you want/need to do is in the "Using Defaults"
section, under "Set a default in the NSRegistrationDomain".
(The rest of the info is interesting and useful, too!)
_______________________________________________
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.