How to apply some code to all submorphs of a Morph
Last updated at 3:42 am UTC on 17 August 2005
Morphs form a composition hierarchy. You can access the submorphs of a Morph by sending it the message #submorphs.
With
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]