Re: Getting all subclasses

2008-06-18 Thread Christopher Nebel
That depends on what you mean by "automatically". If you read the documentation, you'll see this bit: "The load message is sent to classes and categories that are both dynamically loaded and statically linked, but only if the newly loaded class or category implements a method that can resp

Re: Getting all subclasses

2008-06-18 Thread Jean-Daniel Dupas
IIRC, +initialize call the super implementation if the child class does not override it, but not the +load method that is called exactly once per class and per categorie. So +load will not be called automatically. Le 18 juin 08 à 18:57, Mike Abdullah a écrit : Another option would be to w

Re: Getting all subclasses

2008-06-18 Thread Mike Abdullah
Another option would be to write a +load method in your abstract superclass that will be automatically called for any subclasses and register them with the superclass. Mike. On 18 Jun 2008, at 16:45, Laurent Cerveau wrote: Fantastic! Thanks to you and Omar. laurent On Jun 18, 2008, at 9:

Re: Getting all subclasses

2008-06-18 Thread Laurent Cerveau
Fantastic! Thanks to you and Omar. laurent On Jun 18, 2008, at 9:28 AM, Graham Cox wrote: If you need a list of subclasses of a class, there isn't a built-in function - you have to test them one at a time. However I had the exact same need recently and wrote a little helper class to do it.

Re: Getting all subclasses

2008-06-18 Thread Graham Cox
If you need a list of subclasses of a class, there isn't a built-in function - you have to test them one at a time. However I had the exact same need recently and wrote a little helper class to do it. One thing I ran into in my situation is that I really needed to prevent +initialize from e

Re: Getting all subclasses

2008-06-17 Thread Omar Qazi
On Jun 17, 2008, at 10:19 PM, Laurent Cerveau wrote: Hi Is there a way to get all subclases of a class. I have a class that I would call abstract (although I did not find any real way to declare some methods as virtual) and would like to get a list of all "real" subclass implementations.

Getting all subclasses

2008-06-17 Thread Laurent Cerveau
Hi Is there a way to get all subclases of a class. I have a class that I would call abstract (although I did not find any real way to declare some methods as virtual) and would like to get a list of all "real" subclass implementations. Thanks laurent _