discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

isKindOf: - GSObjCIsKindOf


From: Marko Mikulicic
Subject: isKindOf: - GSObjCIsKindOf
Date: Sat, 25 Aug 2001 02:59:37 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801

Hello,

Is there a way, knowing the name of two classes, test for
the isKindOf relation without istantiating the receiver object:

I have noticed that those methods in NSObject are defined so:


- (BOOL) isKindOf: (Class)aClassObject
{
  return [self isKindOfClass: aClassObject];
}

+ (BOOL) isKindOfClass: (Class)aClass
{
  if (aClass == [NSObject class])
    return YES;
  return NO;
}

- (BOOL) isKindOfClass: (Class)aClass
{
  Class class = GSObjCClass(self);

  return GSObjCIsKindOf(class, aClass);
}


Is there a way other than using GSObjCIsKindOf
directly to look if one class inherits from the other one ?

(I have no instances, only classes converted from strings).


Thanks


Marko





reply via email to

[Prev in Thread] Current Thread [Next in Thread]