Re: BOOL parameter passed as nil object
Re: BOOL parameter passed as nil object
- Subject: Re: BOOL parameter passed as nil object
- From: Alex Zavatone <email@hidden>
- Date: Tue, 19 Apr 2016 13:22:13 -0400
I believe that a BOOL can only be YES or NO. A nil value on a BOOL would be NO if I am correct.
Am I correct here?
On Apr 18, 2016, at 9: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@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
_______________________________________________
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