• 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: retain not found in protocol warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >retain not found in protocol warning? (From: Marc Respass <email@hidden>)
 >Re: retain not found in protocol warning? (From: Damien Bobillot <email@hidden>)

  • Prev by Date: Re: retain not found in protocol warning?
  • Next by Date: Re: printing listings from Xcode
  • Previous by thread: Re: retain not found in protocol warning?
  • Next by thread: exited with status (1) error
  • Index(es):
    • Date
    • Thread