Re: Are there any NSUserDefaults keys which aren't valid?
Re: Are there any NSUserDefaults keys which aren't valid?
- Subject: Re: Are there any NSUserDefaults keys which aren't valid?
- From: Matt Gough <email@hidden>
- Date: Thu, 26 Jan 2006 18:11:46 +0000
On 26 Jan 2006, at 17:57, Jonathan del Strother wrote:
NSMutableDictionary* newFileDates = [[[NSUserDefaults
standardUserDefaults] objectForKey:@"File Dates"] mutableCopy];
if there is not already a "File Dates" in the defaults then you will
get nil returned.
[newFileDates setObject:fileDate forKey:albumKey];
This will do nothing with a nil newFileDates.
[[NSUserDefaults standardUserDefaults] setObject:newFileDates
forKey:@"File Dates"];
This will crash trying to add a nil object.
Hope your bug is as simple as that
Matt Gough
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden