What does the compiler say?

Not tried this, but as BOOL is neither a pointer nor subclass of NSObject, I would not expect reliable results, but a type mismatch.

Of course, I could be wrong, YMMV.

Gary



On Apr 18, 2016, at 6:56 PM, Carl Hoefs wrote:

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
Will argument a_bool end up with a 0 value assigned to it?

Q2: But if I invoke it like this:
[self performSelector:@selector(myMethod:) withObject:someObj]; // valid obj
Will argument a_bool end up with a 1 value assigned to it?

-Carl


_______________________________________________

Cocoa-dev mailing list ([email protected])

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/toothpic%40fastq.com

This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to