Re: inherited implicitly created member is no member?
Re: inherited implicitly created member is no member?
- Subject: Re: inherited implicitly created member is no member?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 1 Feb 2011 19:23:53 -0800
On Tue, Feb 1, 2011 at 7:14 PM, Matt Neuburg <email@hidden> wrote:
> Of course I can fix this in several ways, of which the most obvious is to declare the ivar "text" explicitly in the interface for MySuperClass. But I'm curious; why does it happen? I thought declaring the property without the ivar meant that I was implicitly creating the ivar. And as far as the superclass is concerned, it does mean that. Why doesn't the subclass know about this? Thx! m.
Declaring the property makes no guarantee about its storage. It just
says you have methods named -text and -setText.
For all the subclass knows, the superclass's implementation says
`@dynamic text`, and uses some crazy storage mechanism like
objc_setAssociatedObject.
--Kyle Sluder
_______________________________________________
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