Re: email@hidden
Re: email@hidden
- Subject: Re: email@hidden
- From: Gregory Weston <email@hidden>
- Date: Mon, 20 Aug 2007 20:17:30 -0400
Daniel Childm wrote:
Hi,
There is a surprising problem trying to use booleans in Cocoa.
I defined an instance variable as:
BOOL isSyllable;
Then I have basic methods like
- (BOOL) isCandidateValid
{
return isSyllable;
}
But when I build, I get this message:
warning: return makes integer from pointer without a cast
That _is_ surprising.
What's going on? I want to be able to set this ivar to YES or NO and
return that value on a regular basis. Am I missing something basic
here?
Probably, but we can't tell you from what you've shown us. The code
you've presented, in isolation, should not emit the warning you're
seeing. Therefore the actual problem lies elsewhere. Is the above
isCandidateValid method actual code from your project, cut and pasted
into mail, or is it "an example of the kinds of things you're doing?"
Are there other warnings, such as one to the effect that the compiler
is having to infer something it has never seen before? Is there
another declaration of isSyllable perhaps hiding your instance variable?
G
_______________________________________________
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