• 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: run-time list of selectors in protocol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run-time list of selectors in protocol?


  • Subject: Re: run-time list of selectors in protocol?
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 9 Dec 2005 09:05:09 -0800

On 12/9/05, William Turner <email@hidden> wrote:
> Is there a way I can query a protocol at run-time to get a list of
> the selectors it includes?

Never tried it but consider using class_nextMethodList(Class theClass,
void** iterator) [1] and feed @protocol(TheProtocolName) in for
"theClass"... it may work.

[1] <http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple_ref/doc/c_ref/class_nextMethodList>

> On a related note, is there a way to get more detailed information
> when a class fails to "conformToProtocol"?

What type of detail you looking for? Do you want to test support for
the messages you are going to actually attempt to send the object?

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >run-time list of selectors in protocol? (From: William Turner <email@hidden>)

  • Prev by Date: NSRunLoops running in more than one mode
  • Next by Date: Re: threads vs run-loops for keeping your GUI responsive
  • Previous by thread: Re: run-time list of selectors in protocol?
  • Next by thread: Re: run-time list of selectors in protocol?
  • Index(es):
    • Date
    • Thread