Re: isKindOfClass returns null instead of YES or NO
Re: isKindOfClass returns null instead of YES or NO
- Subject: Re: isKindOfClass returns null instead of YES or NO
- From: "Sean McBride" <email@hidden>
- Date: Thu, 21 May 2009 12:33:00 -0400
- Organization: Rogue Research Inc.
On 5/20/09 11:45 PM, Andy Lee said:
>> NSLog(@"Is Member of NSURL: %@", [[step class] isMemberOfClass:
>> [NSURL class]]);
>
>The %@ placeholder is for arguments that are objects.
>isMemberOfClass: and isKindOfClass: return a BOOL, which is not an
>object.
Jeff,
And if you're wondering if the compiler could warn you that %@ and BOOL
do not match, the answer is unfortunately no. -Wformat=2 can give such
warnings when using sprintf() and friends, but not NSString methods.
One of my pet peeves. :)
--
____________________________________________________________
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