Re: @property problem
Re: @property problem
- Subject: Re: @property problem
- From: William Squires <email@hidden>
- Date: Sat, 16 Feb 2008 16:35:18 -0600
Okay, but why the diff? Why should it matter whether you're using 32
or 64 bits? Storage is still storage, and it seems you'd still need
to provide that storage even under a 64-bit runtime.
On Feb 11, 2008, at 3:29 PM, Joshua Emmons wrote:
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:
40satx.rr.com
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