• 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: Is this an incorrect use of categories ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Is this an incorrect use of categories ? (From: Erik Stainsby <email@hidden>)
 >Re: Is this an incorrect use of categories ? (From: Graham Cox <email@hidden>)
 >Re: Is this an incorrect use of categories ? (From: Erik Stainsby <email@hidden>)
 >Re: Is this an incorrect use of categories ? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Is this an incorrect use of categories ?
  • Next by Date: Re: Getting NSApplicationDelegate protocol
  • Previous by thread: Re: Is this an incorrect use of categories ?
  • Next by thread: Re: Is this an incorrect use of categories ?
  • Index(es):
    • Date
    • Thread