[Newbies] Generating subMorphs with relative coordinates

Christian Kellermann ckeen at pestilenz.org
Thu Oct 31 14:31:46 UTC 2019

Dear List,

I would like to generate Morphs inside another parent Morph.
In this case a bunch of CircleMorphs inside a RectangleMorph.

ATM I am generating them first and then adding them as a whole with
a OrderedCollection and addAllMorphs:

Now during creating of the circles I am adding the world offset of
the Rectangle morph to their bounds:

Is there a way to use relative coordinates for everything and have
the system place the Morphs accordingly?

So far I have found addMorphFrontFromWorldPosition: but that seems
a bit awkward to use in this case.

How do you deal with this situation usually?

Thanks and kind regards,


May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20191031/29394f02/attachment.sig>

More information about the Beginners mailing list