Re: NSDocumentController Problem
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