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: Graham Cox <email@hidden>
- Date: Fri, 06 Jul 2012 13:23:42 +1000
On 06/07/2012, at 12:50 PM, Erik Stainsby wrote:
> However, I am getting an "unrecognized selector sent to instance 0xyaddayadda" when I try to run this. I know the selector does exist, so I must have a scoping issue (?)
At run-time, if the target object implements the selector (whether in a category or otherwise), you won't get this message. So, the target object is either not what you think it is, or the category wasn't attached.
If the selector is supplied by a category, then the category must have been loaded in order to be attached to the class. If that category is implemented by the plug-in, you must have loaded and linked the plug-in before calling the method, so if that's the case I'd be looking at where and how you are doing this - usually you use the methods of the NSBundle class to load your plug-in. e.g. -loadAndReturnError:
It's not that clear from what you posted where the category is defined and implemented - in your app or in the plug-in.
--Graham
_______________________________________________
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