The Trunk: EToys-ct.403.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-ct.403.mcz

commits-2
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ct.403.mcz

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

Name: EToys-ct.403
Author: ct
Time: 16 September 2020, 9:28:21.732871 pm
UUID: da566a07-8012-ee4b-88d6-58f224234d76
Ancestors: EToys-eem.400

Fixes an AssertionFailure concerning #doLayoutAgain when a particular arrangement of EToys tiles is laid out.

TileMorph wants to change its owner's layout policy if that is a TilePadMorph as soon as it is embedded into that. However, the wrong hook was chosen for this. #ownerChanged is signaled whenever the owner has changed its layout. Instead, #noteNewOner: is signaled whenever the receiver is embedded into a new owner. Note that this practice of lazy layout modification is still suspect from my perspective, but at least it works again.

Pooh, this one was really hard to find. Thanks a lot to Marcel (mt) and the MessageSendRecorder for their important help! ;-)

=============== Diff against EToys-eem.400 ===============

Item was added:
+ ----- Method: TileMorph>>noteNewOwner: (in category 'change reporting') -----
+ noteNewOwner: ownerMorph
+
+ super noteNewOwner: ownerMorph.
+
+ ((ownerMorph isKindOf: TilePadMorph)
+ and: [ownerMorph layoutPolicy isNil])
+ ifTrue: [
+ ownerMorph
+ layoutPolicy: TableLayout new;
+ hResizing: #shrinkWrap;
+ vResizing: #spaceFill].!

Item was removed:
- ----- Method: TileMorph>>ownerChanged (in category 'change reporting') -----
- ownerChanged
- super ownerChanged.
- (owner class == TilePadMorph and:[owner layoutPolicy isNil]) ifTrue:[
- owner layoutPolicy: TableLayout new.
- owner hResizing: #shrinkWrap.
- owner vResizing: #spaceFill ].!