Article View: comp.sys.next.programmer
Article #1689Re: isKindOf: and IsKindOfClassNamed: problems
From: dobermanmike Mike Panzitta
Date: Thu, 01 Oct 1992 03:56
Date: Thu, 01 Oct 1992 03:56
45 lines
2112 bytes
2112 bytes
In article <60755@mimsy.umd.edu> alex@cs.umd.edu (Alex Blakemore) writes: > In article <timm.717827168@xongmao> timm@xongmao.ncsa.uiuc.edu (Tim McClarren) writes: > > Well, I can't seem to find a rationale for the changes, although I > > did find them documented in ObjC.rtf in the Developer Release Notes. > > I am having the same problem as the original poster. And the Release Notes > > don't make the behavior any clearer to me. I should think that these > > things should both return YES or both return NO. Any other clues? > > the difference between the IsKindOf and IsMemberOf methods (and their cousins > that take class names instead of class objects as args) is how they handle subclasses. > if an object x is an instance of class B (which is a subclass of A) then > x is a kind of A but x is NOT a member of A. > (x is both a kind of B and a member of B) > > for more info look in the concepts section on objective C or the > reference for the class Object. > > -- > --------------------------------------------------- > Alex Blakemore alex@cs.umd.edu NeXT mail accepted This is well documented in the NeXT docs (sorry about the method name change...I should have checked the release notes first). However, the functional problem still remains. I have an instance of a class (say myObject) that inherits from another class (MyClass). The following situation occurs (verified within gdb): [myObject isKindOf:[MyClass class]] returns 0 but [myObject isKindOfClassNamed:"MyClass"] returns 1 Has anyone else experienced this? -Mike -- Mike Panzitta Doberman Systems doberman!mike@uunet.uu.net (NeXTMail)
Technical Details
Message-ID:
<1992Oct1.035612.22702@doberman.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!orca!javelin.sim.es.com!doberman!mikeReferences:
<60755@mimsy.umd.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!orca!javelin.sim.es.com!doberman!mike From: doberman!mike (Mike Panzitta) Subject: Re: isKindOf: and IsKindOfClassNamed: problems Message-ID: <1992Oct1.035612.22702@doberman.uucp> Sender: mike@doberman.uucp Reply-To: doberman!mike@esunix.sim.es.com Organization: Doberman Systems References: <60755@mimsy.umd.edu> Date: Thu, 1 Oct 92 03:56:12 GMT Lines: 45