How to apply some code to all submorphs of a Morph
Last updated at 11:21 pm UTC on 6 June 2018
Morphs form a composition hierarchy. You can access the submorphs of a Morph by sending it the message #submorphs.
aMorph submorphsDo: [:each | each someMessage]
you can send someMessage to all direct submorphs.
However if you want to apply something to the whole composition hierarchy you have to use
aMorph allMorphsDo: [:each | each someMessage]