Re: Preferences caching?
Re: Preferences caching?
- Subject: Re: Preferences caching?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 29 Nov 2013 18:54:23 -0800
A quick lesson in avoiding “corrupt preferences” bugs…
CODE:
NSUserDefaults* ud = [NSUserDefaults standardUserDefaults] ;
NSLog(@"safely: %@", [ud stringForKey:@“myDataObject"]) ;
NSLog(@"unsafe: %@", [[ud objectForKey:@"myDataObject"] stringValue]) ;
CONSOLE OUTPUT:
safely: (null)
-[__NSCFData stringValue]: unrecognized selector sent …
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden