• 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: Recovering a list of selectors to which an object can respond
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Chris Hanson <email@hidden>
  • Date: Tue, 18 Sep 2007 11:17:56 -0700

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?

  -- 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


  • Follow-Ups:
    • Re: Recovering a list of selectors to which an object can respond
      • From: "Gustavo Vera" <email@hidden>
References: 
 >Recovering a list of selectors to which an object can respond (From: "Gustavo Vera" <email@hidden>)
 >Re: Recovering a list of selectors to which an object can respond (From: "Gustavo Vera" <email@hidden>)

  • Prev by Date: Re: Recovering a list of selectors to which an object can respond
  • Next by Date: Re: Recreating XCode run log behavior in an NSTextView
  • Previous by thread: Re: Recovering a list of selectors to which an object can respond
  • Next by thread: Re: Recovering a list of selectors to which an object can respond
  • Index(es):
    • Date
    • Thread