[Pharo-dev] LayoutFrame bug

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Nov 8 07:47:32 EST 2017

don't you get nice red-cross when opening a browser and selecting comment?

The problem is LayoutFrame having a Point instead of Number in
fraction/offset inst. var.

So I defined two horrible hacks in order to be able to work with Pharo

Point>>@ n  ^x @ n
Point>>asInteger ^x asInteger

then could instrument the LayoutFrame inst. var. setters with horrible
checks like:
    aNumber isNumber ifFalse: [ self halt].

And after a few seconds of IDE usage:

        addMorph: commentWidget
        fullFrame: (LayoutFrame identity leftFraction: 0.5 at 0 ;
                        leftOffset: delta).

Huh! it's as pleasant as not eating own dog food
I think this comes from a  recent refactoring. I can hardly use in image
tools to trace it.
Iceberg bugs, MC has lost ancestry and is just good at synchronizing disk
working copy with image working copy, but there is github & git API:


As it's nearly impossible to make giant refactorings like this without
human error,
and as it's as impossible to review pull request with many lines of code,
I wonder if it is possible to automate those with rewrite rules...

I let you finish the work (open issue, patch, commit, etc...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171108/1fb92d5c/attachment-0002.html>

More information about the Pharo-dev mailing list