Re: @property problem
Re: @property problem
- Subject: Re: @property problem
- From: Joshua Emmons <email@hidden>
- Date: Mon, 11 Feb 2008 15:29:03 -0600
I've boiled the problem down to this snippet:
@interface MyWindow : NSWindow
{
}
@property(readwrite) BOOL capturing;
...
error: synthesized property 'capturing' must either be named the
same as a compatible ivar or must explicitly name an ivar
You haven't declared a compatible ivar named "capturing". You'd need
to do something like this:
@interface MyWindow : NSWindow
{
BOOL capturing; // <-- here!
}
@property(readwrite) BOOL capturing;
The line marked above declared an ivar with the same name and the same
type as your property declaration, so now synthesize will be able to
do its thing.
Obj-C *can* be smart enough to generate this ivar for you behind the
scenes, but only if you're using the 64bit runtime. If you don't
require 32bit compatibility, turn it off, and then you don't have to
worry about declaring these ivars for synthesize.
Cheers,
-Joshua Emmons
_______________________________________________
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