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                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to