Re: BOOL parameter passed as nil object
Re: BOOL parameter passed as nil object
- Subject: Re: BOOL parameter passed as nil object
- From: Sean McBride <email@hidden>
- Date: Mon, 18 Apr 2016 22:25:05 -0400
- Organization: Rogue Research Inc.
On Mon, 18 Apr 2016 18:56:43 -0700, Carl Hoefs said:
>Suppose I have an object with a declared method signature:
> -(void)myMethod:(BOOL)a_bool;
>
>Q1: If I invoke it like this:
> [self performSelector:@selector(myMethod:) withObject:nil]; // nil obj
Stop right there, you are violating the documentation of the API:
"aSelector should identify a method that takes a single argument of type id. For methods with other argument types and return values, use NSInvocation."
Is there still no compiler warning for this? :(
Cheers,
--
____________________________________________________________
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