[squeak-dev] LayoutFrame>>#printOn:

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Sep 18 14:15:09 UTC 2019


Hi Marcel,


actually I find re-evaluability quite often useful - for example, when I would like to take the LayoutFrame and set it to another Morph. At the moment you need to totally deconstruct + rewrite the expression to reuse it, while on the other hand you can directly print-and-eval points and rectangles. For beginners, it also helps to understand how the Objects are created.


Is

LayoutFrame fractions: (0.25 at 0 corner: 0.5 at 0.42) offsets: (4 at 0 corner: 0@ -20)

actually harder to read than

a LayoutFrame( l 0.25+4 t 0+0 r 0.5+0 b 0.42-20 )

?

(Imho, the latter with the unfamiliar non-Smalltalk syntax looks much more confusing to me. :) )


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 18. September 2019 13:54:55
An: Alan Grimes via Squeak-dev
Betreff: Re: [squeak-dev] LayoutFrame>>#printOn:

Hi Christoph,

I recently changed that to be more valuable for me when debugging layout issues. Feel free to add more "ifNil" checks if needed - there are already some.

However, there is no need to make that string re-evaluable. It's designed to fit the human eye. At least mine. :-)

[cid:47ce2d0b-1951-46cb-b1d6-e433f6d1655a]

Best,
Marcel

Am 18.09.2019 13:50:09 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:

Hi all,


is anyone attached to the current LayoutFrame>>#printOn: design?

The current one fails if some instvars are nil. This is the case for SystemWindowButtons.

Furthermore, I never liked the current string representation, it has a quite cryptic look and does not match the common way you create a LayoutFrame using #fractions:/#offsets:.


Would anyone mind me to rewrite #printOn: in order to return a re-evaluatable string? Are there any dependencies?


Best,

Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190918/d19949e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 34740 bytes
Desc: image.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190918/d19949e2/attachment.png>


More information about the Squeak-dev mailing list