Re: Booleans
Re: Booleans
- Subject: Re: Booleans
- From: John Ku <email@hidden>
- Date: Wed, 27 May 2009 23:54:59 -0700
Thank you all, a newb mistake. :PIm going crazy trying to put pointer on
everything.
Btw, BOOL is not, is Boolean a pointer type?
Thanks!
On Wed, May 27, 2009 at 11:46 PM, Roland King <email@hidden> wrote:
> BOOL isn't an object. you want BOOL not BOOL*
>
> John Ku wrote:
>
>> I am trying to set an object's boolean, everything works but I get a
>> warning
>> of 'pointer from integer without a cast'.
>> *// ---- Here is the Main Class:*
>> [theObject setActivated: YES];
>>
>> *// ---- Here is the Object Class:*
>> @property(readwrite, assign) BOOL *activated;
>> @synthesize activated;
>>
>> - (void) setActivated: (BOOL *) boolean {
>> activated = boolean;
>> }
>>
>>
>> The weird thing is that if i setActivated: NO, it would not give any
>> warning
>> or error. Only When I setActivated: YES i get this:
>> "warning: passing argument 1 of 'setActivated:' makes pointer from integer
>> without a cast"
>>
>> Anyone know what's wrong?
>>
>> Thanks,
>>
>> John
>> _______________________________________________
>>
>> 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
References: | |
| >Booleans (From: John Ku <email@hidden>) |
| >Re: Booleans (From: Roland King <email@hidden>) |