[etoys-dev] [Newbies] How can I embed an object in another "holder"

Steve Thomas sthomas1 at gosargon.com
Mon Jan 28 01:31:37 EST 2013

Thanks Subbu.

I started looking at what you sent and poking around trying to figure out
the code, then realized I could do it "the Etoys way" and put the morph
back into its previous holder (which can vary and I store in a player
I wound up using a playfield include tile and replacing *playfield* with
the variable used to store the original holder:

self getOrigHolder include: self.


On Mon, Jan 28, 2013 at 12:53 AM, K. K. Subramaniam <kksubbu.ml at gmail.com>wrote:

> On Monday 28 January 2013 09:54 AM, Steve Thomas wrote:
>> I'm using Etoys and I want to change and objects "holder"
>> What is the squeak code to embed it in a different object?
> You have to detach the morph from its existing owner and then add it to
> the destination container. See grabMorph:from and attachMorph: methods for
> examples.
> Also see senders of addMorph: and its variants addMorphFront:,
> addMorphBack: for more examples on how to embed morphs.
> A Holder is essentially a PasteUpMorph with some options turned on. Other
> variants are Playfield, PartsBin etc.
> Regards .. Subbu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20130128/b1e86649/attachment.html>

More information about the etoys-dev mailing list