Re: isKindOfClass vs. loading bundles: nope?!?!?!?
Re: isKindOfClass vs. loading bundles: nope?!?!?!?
- Subject: Re: isKindOfClass vs. loading bundles: nope?!?!?!?
- From: Ondra Cada <email@hidden>
- Date: Thu, 21 Mar 2002 16:07:17 +0100
On Thursday, March 21, 2002, at 10:52 , Andy Lee wrote:
No, the zero makes sense. Remember, "class" is a Class, not an instance.
If you wanted to see a 1 instead of the 0, you could change that NSLog
line to:
NSLog(@"got a class %@ (%d)",s,
[[[class alloc] init] isKindOfClass:[MLLoadableObject
class]]);
(i) it would seem kind of silly to make an instance just to check class
relationship, would it not?
(ii) all NSObject instance methods are by definition class methods too
I could be wrong, but I suspect there is no built-in "+descendsFromClass:
" method that does the same as your +ocs_isKindOfClass:. If there were,
I'd expect it to have been declared in /usr/include/objc/Object.h.
Nope, that's old compatibility API. Foundation.framework/Headers/NSObject.
h is the place.
You could add it in a category.
That I did, but am still kinda bewildered that such a very basic thing
like kindOfClass: does not work?!?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.