Re: Is this an incorrect use of categories ?
Re: Is this an incorrect use of categories ?
- Subject: Re: Is this an incorrect use of categories ?
- From: Greg Parker <email@hidden>
- Date: Fri, 06 Jul 2012 12:48:06 -0700
On Jul 5, 2012, at 9:24 PM, Graham Cox <email@hidden> wrote:
> If so, I don't think that will work. When your app is loaded and linked when it's launched, the category won't be attached to the class 'MyClass' because it doesn't exist. It is only loaded and linked when the plug-in is loaded, but the runtime can't retrospectively attach the category - its opportunity to do so automatically has passed. You might be able to use the low-level runtime methods to attempt to reattach the category after you have loaded the plug-ins.
This is usually not an issue because usually you get a missing symbol error from the linker if you try to arrange your code this way. (The category implementation has a C symbol reference to the class's implementation.)
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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