[Pharo-dev] LayoutFrame bug

Sven Van Caekenberghe sven at stfx.eu
Wed Nov 8 07:58:08 EST 2017

Yeah, I just got in trouble too by looking at class comments.

Heroic debugging, Nicolas !

> On 8 Nov 2017, at 13:47, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
> Hi,
> don't you get nice red-cross when opening a browser and selecting comment?
> (Pharo7.0-32bit-b5ec533.image)
> 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:
> AbstractNautilusUI>>buildCodePanelWithCommentOnRight
> ...snip...
>     sourceCodePanel 
>         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:
> https://github.com/pharo-project/pharo/commit/042baad47fddb63db2dd0beefeec692962f06dfe#diff-b8c1cff56276a5a583eec641253123da
> 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...)

More information about the Pharo-dev mailing list