Re: Trouble calling class_addIvar()
Re: Trouble calling class_addIvar()
- Subject: Re: Trouble calling class_addIvar()
- From: Rick Mann <email@hidden>
- Date: Fri, 8 Oct 2010 17:27:22 -0700
On Oct 8, 2010, at 17:12:28, Kyle Sluder wrote:
> The documentation states you can't add ivars to classes that have
> already been registered. In order for a class to receive +initialize,
> it logically must already have been registered with the runtime.
> Therefore, it's quite apparent why class_addIvar() can't be called
> from +initialize.
Hmm...thinking about it a bit more...how do dynamically-synthesized property ivars work (where you just @synthesize them without declaring an ivar)? Do they use class_addIvar()? That suggests I'm wrong about class layout.
--
Rick
_______________________________________________
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