Does +isSubclassOfClass work?
Does +isSubclassOfClass work?
- Subject: Does +isSubclassOfClass work?
- From: Thomas Lachand-Robert <email@hidden>
- Date: Thu, 1 Jan 2004 16:04:10 +0100
Is there something that I don't understand with NSObject
+isSubclassOfClass: ?
If you fire a simple foundation tool with only this content:
int main () {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
Class s = [NSObject class];
Class c = [pool class];
if ([s isSubclassOfClass:c]) return 1;
NSCAssert ([c superclass] != s, @"error!") ;
return 0;
}
then it seems to me that the assertion should always be ok (actually
the function should return 1). But it doesn't, and the assertion fails!
(Note that it doesn't matter which classes are used, here it is
NSObject and NSAutoreleasePool but I got the problem with other classes
before this simple test.)
Any insight on this?
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.