• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Are there any NSUserDefaults keys which aren't valid?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Are there any NSUserDefaults keys which aren't valid?
      • From: Jonathan del Strother <email@hidden>
References: 
 >Are there any NSUserDefaults keys which aren't valid? (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: Re: I think I have found a big bug in NSBrowser
  • Next by Date: Re: Are there any NSUserDefaults keys which aren't valid?
  • Previous by thread: Are there any NSUserDefaults keys which aren't valid?
  • Next by thread: Re: Are there any NSUserDefaults keys which aren't valid?
  • Index(es):
    • Date
    • Thread