[etoys-dev] How can I embed one object in another specific object within a script?

K. K. Subramaniam kksubbu.ml at gmail.com
Mon Jun 28 04:19:51 EDT 2010


On Monday 28 Jun 2010 12:57:11 pm Steve Thomas wrote:
> I want to embed a triangle into a circle. I am using variables of type
> "Player" to refer to both the Triangle and circle.
> Smalltalk code is fine.
Embedding is just prepending a morph to the sub-morphs list of another morph.

If the variable Boss in Triangle points to the circle (player):
 Triangle>>script1
     self getBoss costume renderedMorph addMorphFront: self costume 
renderedMorph

will do the trick.

HTH .. Subbu


More information about the etoys-dev mailing list