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 22:19:22 +0100
On Thursday, March 21, 2002, at 07:45 , Andy Lee wrote:
This, to my surprise, returns YES:
[[NSTextView class] isKindOfClass:[NSObject class]]
I'll shut up on this thread (for now) and let somebody else explain Ondra'
s original puzzle.
I guess it's solved already:
[anyclass isKindOfClass:rootclass] is always YES
[anyclass isKindOfClass:anyotherclass] is always NO
That's since a class behaves (by some internal magic) de-facto as a root
class' instance, and isKindOfClass: is consistent with that.
The problem (completely on my side) is that I lived under a *very* strong
impression that, given the relative meaninglessness of this behaviour
+isKindOfClass, it was quite naturally overridden to give results based on
the class hierarchy.
Nevertheless that impression proved wrong. The only remaining puzzle is
where the heck I've got it ;)
---
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.