ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Oct/function-which-returns-a-list-of-objects-methods

This is function-which-returns-a-list-of-objects-methods in view mode; [Up]


Date: Sun 04-Oct-1989 02:28:11 From: Unknown Subject: function which returns a list of object's methods I am interested in finding (or writing myself) a method which will return a list of an object's known methods. I know about the respondsTo: method, which allows one to ask whether the queried object has a *particular* method, which takes a method as a parameter and returns a boolean indicating whether the object knows the method. I also know about the run-time functions in "Chapter 23: C Functions" in the NeXT online documentation. The function objc_getClasses() returns a table of the classes present in the "executable image", which resembles what I need. I have in mind a function called (for example) objc_getMethods(), where you pass in an object and get back a table of strings or selectors. Does anyone know if such a function exists, and if not, how such a function could be built from the existing libraries? I intend to append the method to the Object class (via categories). The idea is to put all the work into this method, so that I won't have to think about it as I design new classes (they should simply inherit the ability to return message lists). I would appreciate any ideas at all. Thanks in advance! Stefan Gottschalk (stefan@csam.lbl.gov) >From: mlee@marduk.cs.cornell.edu (mark lee)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.