RE: NSUserDefauts - Am I Missing the Obvious?
RE: NSUserDefauts - Am I Missing the Obvious?
- Subject: RE: NSUserDefauts - Am I Missing the Obvious?
- From: Jacques <email@hidden>
- Date: Thu, 19 Dec 2002 17:05:10 +0100
Le jeudi 19 dicembre 2002, Jonathan E. Jackel disait :
>
This may be way too obvious an answer, but I'll try it. It is not clear
>
from the code below what "defaults" is. Have you tried substituting
>
[NSUserDefaults standardUserDefaults] where you now have "defaults"?
You have to do something like that :
NSUserDefaults* defaults;
defaults = [NSUserDefaults standardUserDefaults];
[firstNameField setStringValue:[defaults stringForKey:@"fistName"]];
And to read ans store the prefs :
[[NSUserDefaults standardUserDefaults] setObject:[firstnameField stringValue]
forKey:@"firstname"];
And may be a :
[[NSUserDefaults standardUserDefaults] synchronize];
At the end of your "writePrefs" method.
Jacques
--
_______________________________________________
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.