• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: @property problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @property problem


  • Subject: Re: @property problem
  • From: "Melissa J. Turner" <email@hidden>
  • Date: Mon, 11 Feb 2008 13:27:00 -0800

Properties don't allocate storage, they simply provide a mechanism for accessing it.

You need to declare your ivar somewhere:

@interface MyWindow : NSWindow
{
	id capturing;
}

+Melissa

On Feb 11, 2008, at 13:14, Randall Meadows wrote:

So, I'm trying to be a good little Obj-C 2.0 programmer and use these newfangled properties. Xcode doesn't seem to appreciate my attempts.

I've boiled the problem down to this snippet:

@interface MyWindow : NSWindow
{
}
@property(readwrite) BOOL	capturing;

@end

@implementation MyWindow

@synthesize capturing;

@end

When I compile that, I get the error:

error: synthesized property 'capturing' must either be named the same as a compatible ivar or must explicitly name an ivar

AFAICT, "capturing" IS the name of my ivar. What is it *really* complaining about? What did I do wrong?


Thanks! randy _______________________________________________

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


  • Follow-Ups:
    • Re: @property problem
      • From: j o a r <email@hidden>
    • Re: @property problem
      • From: "Shawn Erickson" <email@hidden>
References: 
 >@property problem (From: Randall Meadows <email@hidden>)

  • Prev by Date: @property problem
  • Next by Date: Re: Core Data Cascade delete rule sometimes doesn't
  • Previous by thread: @property problem
  • Next by thread: Re: @property problem
  • Index(es):
    • Date
    • Thread