Messages to "super"

Stephane Ducasse ducasse at iam.unibe.ch
Sat Aug 30 16:11:30 UTC 2003


Martin using respondsTo: is not really good because reponsTo: is a meta 
operation that should be reserved for the time when you are building 
tools or other IDE support.

In all the code I wrote I never (or once use it) so I guess that you 
should not use in this case :)

Stef


On Friday, August 29, 2003, at 08:32 PM, Martin Drautzburg wrote:

> I thought I knew it all, but ...
>
> I created the following class
>
>         Object subclass: #Foo ...
>         bar
>                 ^ self
>
> When I create aFoo and inspect it, it answers true to both
>         self respondsTo: #bar and
>         super respondsTo: #bar
>
> also I get Foo no matter if I ask
>         self class or
>         super class
>
> Can someone explain ?
>
> The reason why I was doing this, was in a #mouseDown method I thoght
> I'd invoke mouseDown on super if it came from a mouse button I didn't
> handle. But since I didn't know if the superclass has a #mouseDown
> method at all I tried to figure that out by sending a #respondsTo:
>
>
>



More information about the Squeak-dev mailing list