Hmm... we might want to change all "getters" into lazy initializers? #leftFraction, #rightFraction, ... or at least return "0" on "ifNil"?

Best,
Marcel

Am 30.12.2019 00:11:53 schrieb Jakob Reschke <forums.jakob@resfarm.de>:

For some reason I encounter LayoutFrames with nil in the right and bottom variables... of course, these don't understand printOn:maxDecimalPlaces:.

Am Do., 17. Jan. 2019 um 11:19 Uhr schrieb <commits@source.squeak.org>:
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.406.mcz

==================== Summary ====================

Name: Graphics-mt.406
Author: mt
Time: 17 January 2019, 11:18:39.003727 am
UUID: 027d00a7-113d-4b9f-aaec-79e3373339c1
Ancestors: Graphics-mt.405

Adds an informative string representation for LayoutFrame to support layout design and debugging.

=============== Diff against Graphics-mt.405 ===============

Item was added:
+ ----- Method: LayoutFrame>>printOn: (in category 'printing') -----
+ printOn: aStream
+
+       super printOn: aStream.
+       
+       aStream nextPutAll: '( '.
+       
+       { {'l'. self leftFraction. self leftOffset}. {'t'. self topFraction. self topOffset}. {'r'. self rightFraction. self rightOffset}. {'b'. self bottomFraction. self bottomOffset} } do: [:spec |
+               aStream nextPutAll: spec first; space.
+               
+               spec second printOn: aStream maxDecimalPlaces: 2.
+               
+               aStream nextPutAll: ((spec third ifNil: [0]) >= 0 ifTrue: ['+'] ifFalse: ['-']).
+               (spec third ifNil: [0]) abs printOn: aStream maxDecimalPlaces: 0]
+                       separatedBy: [aStream space].
+                       
+       aStream nextPutAll: ' )'.!