Re: NSUserDefaultsController
Re: NSUserDefaultsController
- Subject: Re: NSUserDefaultsController
- From: James Spencer <email@hidden>
- Date: Sat, 8 Nov 2003 22:03:31 -0600
On Nov 8, 2003, at 4:04 PM, mmalcolm crawford wrote:
On Nov 8, 2003, at 1:05 PM, James Spencer wrote:
NSData * tempData = [[[NSUserDefaultsController
sharedUserDefaultsController]
defaults] valueForKey:@"smtpServer"];
but what is returned is a data object and I can't figure out how to
convert this object back into my NSString.
NSString * server = [[[NSUserDefaultsController
sharedUserDefaultsController]
defaults] stringForKey:@"smtpServer"];
Thank you very much for this as it allows me to ask a more intelligent
question, or at least I hope its more intelligent. This is what I
initially tried. Unfortunately, what is being returned in server is
nil. I've double checked the key, going to the extent of copying it
and pasting it from Interface Builder and I know there is in fact a
valid value in the defaults because when I quit the application and
restart it, it is correctly putting the value into my Preferences
window.
Any hints on what I might look at to figure out why I'm coming up with
no string?
Spence
James P. Spencer
Rochester, MN
email@hidden
"Badges?? We don't need no stinkin badges!"
_______________________________________________
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.