ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Jul/respondsTo

This is respondsTo in view mode; [Up]


Date: Sun 20-Jul-1989 04:22:46 From: Unknown Subject: respondsTo Now here is something I can not figure out why, can anyone enlighten me please? I defined a class: @implementation MyMatrix: Matrix { ... } +newFrame:aFrame { ... } { .... } { } @end In some other place I have the following code: myMatrix = [MyMatrix newFrame:&aframe]; ... if ([myMatrix respondsTo:@selector(cellPressed:)]) { ... } if ([myMatrix respondsTo:@selector(deleteSelf:)]) { ... } ... Then I found myMatrix responds to cellPressed: but does not respond to deleteSelf. I did not understand why and I switched the place of cellPressed: and of code says myMatrix only responds to deleteSelf:, not to cellPressed: It seems like it only responds to the first method defined. Now what is going on? What am I missing? BTW, I set the target of myMatrix to itself. IS it allowed? Thanks --yufeng ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Yufeng Tsui, IU. HOME OF HOOSIERS {ihnp4!inuxc,rutgers,pyramid}!iuvax!silver!tsui tsui@silver.bacs.indiana.edu (192.12.206.2) tsuiy@iubacs.bitnet (forwarded) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >From: alves@castor.usc.edu (William Alves)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.