• 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: respondsToSelector & "warning: may not respond"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: respondsToSelector & "warning: may not respond"


  • Subject: Re: respondsToSelector & "warning: may not respond"
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Sat, 27 Nov 2010 12:03:13 -0600

Or I believe you can also do id< NSObject, MyProtocol > if you need
something that conforms to both. Unless you actually need something
that is only implemented in the NSObject class and not defined in the
protocol.

On Sat, Nov 27, 2010 at 11:35 AM, David Duncan <email@hidden> wrote:
> On Nov 26, 2010, at 6:22 PM, Dave Zwerdling wrote:
>
>> You can implement other methods and do a single cast to NSObject <nameOfProtocol>* (or id<nameOfProtocol> if you don't need the NSObject methods)
>
>
> It is often impossible to get away from needing at least some of NSObject's functionality, but fortunately you can declare that your protocol inherits from another, and there is also an NSObject protocol that defines the core functionality of the class, so you can do this when you declare your protocol and never need to worry about "NSObject<someProtocol>"
>
> @protocol SomeProtocol : NSObject
> // stuff
> @end
> --
> David Duncan
>
> _______________________________________________
>
> 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
>
_______________________________________________

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: 
 >respondsToSelector & "warning: may not respond" (From: Mikkel Eide Eriksen <email@hidden>)
 >Re: respondsToSelector & "warning: may not respond" (From: Mikkel Eide Eriksen <email@hidden>)
 >Re: respondsToSelector & "warning: may not respond" (From: Mike Abdullah <email@hidden>)
 >Re: respondsToSelector & "warning: may not respond" (From: Dave Zwerdling <email@hidden>)
 >Re: respondsToSelector & "warning: may not respond" (From: David Duncan <email@hidden>)

  • Prev by Date: Re: NSTask with unzip
  • Next by Date: Re: NSTask with unzip
  • Previous by thread: Re: respondsToSelector & "warning: may not respond"
  • Next by thread: NSTask with unzip
  • Index(es):
    • Date
    • Thread