FROM : John Hörnkvist
DATE : Tue Jan 15 20:45:44 2002
On mendag, januari 14, 2002, at 08:16 , Drew McCormack wrote:
> Is it possible to get a list of all classes in an application? So, is
> there a method to return an array of all loaded classes?
> I've looked in NSBundle, and NSApplication, and can't find anything.
> Basically, I'm trying to avoid having to make a table of classes
> myself. I thought it would be neat if I could just loop through all the
> classes, sending each a "respondsToSelector:" message to making
> auxiliary lists of classes for specific purposes.
Take a look at /usr/include/objc/objc-runtime.h. (objc_getClassList)
Note that not everything that is a class has to behave like NSObject or
Object; be careful to check that the class is something you know how to
handle before you start sending messages to it.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com
DATE : Tue Jan 15 20:45:44 2002
On mendag, januari 14, 2002, at 08:16 , Drew McCormack wrote:
> Is it possible to get a list of all classes in an application? So, is
> there a method to return an array of all loaded classes?
> I've looked in NSBundle, and NSApplication, and can't find anything.
> Basically, I'm trying to avoid having to make a table of classes
> myself. I thought it would be neat if I could just loop through all the
> classes, sending each a "respondsToSelector:" message to making
> auxiliary lists of classes for specific purposes.
Take a look at /usr/include/objc/objc-runtime.h. (objc_getClassList)
Note that not everything that is a class has to behave like NSObject or
Object; be careful to check that the class is something you know how to
handle before you start sending messages to it.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com
| Related mails | Author | Date |
|---|---|---|
| Drew McCormack | Jan 14, 20:16 | |
| David Remahl | Jan 15, 20:28 | |
| Kurt Revis | Jan 15, 20:42 | |
| John Hörnkvist | Jan 15, 20:45 | |
| Bill Bumgarner | Jan 16, 05:01 |






Cocoa mail archive

