• 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: NSDictionary and plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary and plist


  • Subject: Re: NSDictionary and plist
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 5 Aug 2005 15:41:02 -0600


On Aug 5, 2005, at 3:25 PM, Jeff Childers wrote:

NSLog([[myGlobals objectForKey:@"A"] objectForKey:@"art_high"]);

Kindly disregard the last message; I missed this part...

The exception is caused because you are passing an integer into an argument that expects a string. But in general, when a function takes a variable amount of arguments like NSLog() does, then you shouldn't pass anything into its string argument that is not a printf-style formatted string. Otherwise, if you passed in a string that has a % character in it or something similar, then you could easily crash the program. Instead, do this:

NSLog(@"%@", someObject);

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________ 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
References: 
 >NSDictionary and plist (From: Jeff Childers <email@hidden>)

  • Prev by Date: Re: NSDictionary and plist
  • Next by Date: <relationship fault: 0x4ee6830 ...>
  • Previous by thread: Re: NSDictionary and plist
  • Next by thread: <relationship fault: 0x4ee6830 ...>
  • Index(es):
    • Date
    • Thread