• 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: NSDocumentController Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocumentController Problem


  • Subject: Re: NSDocumentController Problem
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 3 Mar 2009 13:44:33 -0500
  • Organization: Rogue Research Inc.

On 3/3/09 11:30 AM, Nick Zitzmann said:

>>      NSLog([e description]);
>
>Don't ever do this. NSLog() takes a varargs string, so if there is a %
>in the description, then the app will crash. Instead, do this:
>NSLog(@"%@", e);

The compiler can catch this mistake if you add "-Wformat=2".  It will warn:

"warning: format not a string literal and no format arguments"

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

References: 
 >NSDocumentController Problem (From: 陈清华 <email@hidden>)
 >Re: NSDocumentController Problem (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: NSDocumentController Problem
  • Next by Date: Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem
  • Previous by thread: Re: NSDocumentController Problem
  • Next by thread: -[UIView actionForLayer:forKey:] returns NSNull
  • Index(es):
    • Date
    • Thread