Re: run-time list of selectors in protocol?
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