Not sure what's wrong with this code to using NSUserDefaults...
Not sure what's wrong with this code to using NSUserDefaults...
- Subject: Not sure what's wrong with this code to using NSUserDefaults...
- From: Patrick William Walker <email@hidden>
- Date: Wed, 23 Jun 2010 21:11:40 -0300
... beyond me but here it is.
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
[prefs setObject: @"120" forKey: @"Length"];
[prefs synchronize];
When the program is run in the iPhone simulator (v3.2, not using 4.0 yet), it just dies. Nothing on the console log so I set a breakpoint and got a backtrace. It's pointing to the setObject: method call and it's generating an access exception. If I comment out the setObject portion, it runs fine. It's driving me nuts considering I've confirmed this is nothing out of the oridinary when looking at code provided by others on the web. It's driving me absolutely bonkers. Even setting it to setInteger: 120 does the same failure.
Any suggestions?
Thanks
Will
_______________________________________________
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