FW: Bug in class message behaviour

Johan Fabry johan.fabry at vub.ac.be
Thu Aug 24 11:43:00 UTC 2000


Maurice Rabb wrote:

> One way that you might be able to get around your problem is to use
> the dynamic sending mechanism.  It always performs normal sends.
> 
>         anObject perform: #class
> 
> This will only help you however if you know every location you want
> to make use of your polymorphism on #class.  Otherwise, you would
> need to change _every_ call site for #class to the above, which would
> _not_ be recommended.

As the other Johan (there's two of us running around here) pointed out,
there are cases where we do need to be able to override #class sends in
the image. In fact, there are two examples of this in the 2.7 and 2.8
Squeak image: ObjectOut and ImageSegmentRootStub.

Consider ObjectOut: it is "a stand in for an object out on the disk",
which uses #messageNotUnderstood to read in the actual object. So if I
were to send #class to an ObjectOut instance, I would get ObjectOut,
which is clearly not what I want, since I want to refer to the object
out on the disk, and not to the stand in.

--
"You are more than the sum       Johan Fabry - Johan.Fabry at vub.ac.be
 of what you consume.            Vrije Universiteit Brussel
 Desire is not an occupation."   Programming Technology Lab, Room 10F709
  -- KMFDM                       Pleinlaan 2, 1050 Brussels, Belgium





More information about the Squeak-dev mailing list