Hi all,
I think I found a bug in the Morphic TableLayout logic when combining #spaceFill with #minExtent. Please watch the following "minimum failing example":
Expected output: #(50 50). Actual output: #(69 31).
Here is also a pic for increasing the reach of this message:
Could you please soon confirm to me that this is a bug? In my opinion, this is quite obvious because "min extent" does not make any indications like "Please do not regard my extent while laying me out". Its very only effect should be, as stated by the name, "don't shrink me smaller than this value". This bug gets even more important if you consider that #minExtent cannot only be hard-coded via #minimumExtent but also be computed from a nested table layout that consists of rigid morphs. This way, I became aware of that behavior at all.
I already found the origin of the presumable error: TableLayout >> #layoutTopToBottom:in: or #layoutLeftToRight:in: for the other dimension, respectively. But the same behavior also occurs if a #wrapDirection is specified and we don't get into the "fast line" as described #layout:in:. So I wonder whether this might be a conscious design decision rather than a problem by design. Is it possible at all to reach the desired behavior in linear time? I need to check this, but before doing so, your confirmation or objection would be greatly appreciated.
Best, Christoph
Carpe Squeak!
|
Von: Squeak-dev <[hidden email]> im Auftrag von Thiede, Christoph
Gesendet: Donnerstag, 10. September 2020 18:33:19 An: Squeak Dev Betreff: [squeak-dev] Bug in TableLayout for #spaceFill + #minExtent? Hi all,
I think I found a bug in the Morphic TableLayout logic when combining #spaceFill with #minExtent. Please watch the following "minimum failing example":
Expected output: #(50 50). Actual output: #(69 31).
Here is also a pic for increasing the reach of this message:
Could you please soon confirm to me that this is a bug? In my opinion, this is quite obvious because "min extent" does not make any indications like "Please do not regard my extent while laying me out". Its very only effect should be, as stated by the name, "don't shrink me smaller than this value". This bug gets even more important if you consider that #minExtent cannot only be hard-coded via #minimumExtent but also be computed from a nested table layout that consists of rigid morphs. This way, I became aware of that behavior at all.
I already found the origin of the presumable error: TableLayout >> #layoutTopToBottom:in: or #layoutLeftToRight:in: for the other dimension, respectively. But the same behavior also occurs if a #wrapDirection is specified and we don't get into the "fast line" as described #layout:in:. So I wonder whether this might be a conscious design decision rather than a problem by design. Is it possible at all to reach the desired behavior in linear time? I need to check this, but before doing so, your confirmation or objection would be greatly appreciated.
Best, Christoph TableLayoutTest-testMinimumExtent.st (1K) Download Attachment
Carpe Squeak!
|
Hi Christoph, thanks for this report. Overall, the support for minimum extent in Squeak's layouts is rather ... hmpf. For TableLayout, however, it should work. I will take a look into it. Best, Marcel
|
Free forum by Nabble | Edit this page |