[squeak-dev] The Trunk: Graphics-topa.301.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Sep 16 17:19:22 UTC 2014


Nice catch indeed.
But, ouch!
    (self left @ self top) ~= self topLeft...
Without looking at the code, it sounds like heresy!
Wouldn't the real fix be to name a cat a cat? (a corner a corner in this
case).

After a brief look at the code, of course things are not so simple.
I'm not sure I completely understand the contracts, but inside the owner
rectangular area, there are only some portions available for displaying
text, and top answers the topMostAvailableDisplayArea...
This fake insulate some users of top from the knowledge of this
availableAreaForDisplay feature which sounds like a good thing...
But in the same time, it fakes the innocent users of topLeft expecting
top+left=topLeft.
No matter the di initials (sorry to scratch an icon), but IMO it's a well
too sophisticated hack, and such hacks inevitably leads to such bugs.

As why we do not apply such ingeniosity to left, it's above my current
understanding.




2014-09-16 17:29 GMT+02:00 Frank Shearar <frank.shearar at gmail.com>:

> On 16 September 2014 16:16,  <commits at source.squeak.org> wrote:
> > Tobias Pape uploaded a new version of Graphics to project The Trunk:
> > http://source.squeak.org/trunk/Graphics-topa.301.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Graphics-topa.301
> > Author: topa
> > Time: 16 September 2014, 5:16:44.215 pm
> > UUID: a66aac86-031b-4db4-97ce-e33376745f9e
> > Ancestors: Graphics-mt.300
> >
> > Fix Mantis 5711
> >         http://bugs.squeak.org/view.php?id=5711
> > after 7 years...
> >
> > =============== Diff against Graphics-mt.300 ===============
>
> Don't forget to tell Mantis that :)
>
> frank
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140916/a8d3b0f8/attachment.htm


More information about the Squeak-dev mailing list