Re: retain not found in protocol warning?
Re: retain not found in protocol warning?
- Subject: Re: retain not found in protocol warning?
- From: Marc Respass <email@hidden>
- Date: Wed, 12 Jul 2006 15:00:22 -0400
On Jul 12, 2006, at 1:43 PM, Damien Bobillot wrote: Marc Respass wrote : My app uses a plugin architecture. I load the bundle and retain the instance. When I invoke -retain on my instance, I get a warning '-retain not found in protocol'. Since I've never done this before now, I'm not sure what to think. I know that if the instance subclasses NSObject, it will respond to retain but I am trying to eliminate all warnings and this one is bugging me. Here's the lines that cause the warning. Any tips are appreciated.
id <MyPluginProtocol> bundle = [self loadBundleAtPath:pluginPath]; [bundle retain];
Try the types "id <MyPluginProtocol, NSObject>", or "NSObject <MyPluginProtocol>", or make MyPluginProtocol inheriting from the NSObject protocol :
@protocol MyPluginProtocol <NSObject> ... @end
Many thanks, Damien. This is my first protocol :). I made it inherit from the NSObject protocol. That seems best. Anything that implements my protocol must at least subclass NSObject (or implement the protocol)
Thanks again Marc |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden