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
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
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:
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.
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
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.
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
_