Re: Recovering a list of selectors to which an object can respond
Re: Recovering a list of selectors to which an object can respond
- Subject: Re: Recovering a list of selectors to which an object can respond
- From: "Gustavo Vera" <email@hidden>
- Date: Tue, 18 Sep 2007 15:32:05 -0300
On 9/18/07, Chris Hanson <email@hidden> wrote:
>
> On Sep 18, 2007, at 11:07 AM, Gustavo Vera wrote:
>
> > Answering to myself, I believe that here is the solution
> >
> >
> http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#/
> > /apple_ref/c/func/class_nextMethodList
>
> Note that getting the methods implemented on a class is not the same
> as getting the messages that the class or an instance of that class
> can respond to. Even if you get the superclass methods too (and so on
> up the chain), the class may choose to handle messages at runtime that
> it has no explicit method for.
>
> In general, it's better to ask a class if it can respond to a
> particular message than to ask it for a collection of methods. What
> higher-level task are you really trying to accomplish by asking a
> class for its subclasses or its methods?
Well, actually, I don't really need to ask a class for its subclasses (not
at this moment at least), I just asked also about that just as a possible
(probably even more complicated) workaround for what I want to implement, if
nobody answered the main question. Thanks!
-- Chris
>
>
_______________________________________________
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