<div dir="ltr"><span class="Apple-style-span" style="border-collapse: collapse; ">&gt;Hi Kemal,<br><br>&gt;it&#39;s part of the Etoys philosophy to have only a single class of player. For example, you can change the costume (the morph) of a player dynamically, so the player needs to have the vocabular to serve all the &gt;different costumes it could wear. This would break if you create specialized subclasses of Player.<br>
<br>&gt;Btw, in Smalltalk adding extension methods to other classes is not considered as &quot;intrusive&quot; as in other languages.<br><br>&gt;Hth,<br><br>&gt;- Bert -</span><br><div><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">I don&#39;t understand. What is the best option for making morphs scriptable?</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">1. Extend Player&nbsp;</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;">or</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">2. Create a subclass of Player and add the method #newPlayerInstance to the morph which returns the correct instance of Player (DiceMorph and CalculatorMorph do this)</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">What problems could cause the second option?</span></div><div>
<span class="Apple-style-span" style="border-collapse: collapse;">Bye</span></div></div>