How to apply some code to all submorphs of a Morph
Last updated at 10:20 am UTC on 6 May 2019
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]