On Mon, Feb 14, 2011 at 10:41 PM, K. K. Subramaniam <span dir="ltr"><<a href="http://kksubbu.ml">kksubbu.ml</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Monday 14 Feb 2011 4:49:33 pm Steve Thomas wrote:<br>
> In the class additionsToViewerCategoryFraction I added a "slot" using:<br>
><br>
> (slot st1 'The quantity of Steve parts' Number readWrite Player<br>
> getMajorTicks Player setMajorTicks:)<br>
><br>
><br>
> The part I was missing was I had to to Etoys-Scripting Player the<br>
> getMajorTicks and<br>
> setMajorTicks Methods.<br>
><br>
> I also found I can use command instead of slot.<br>
</div>slot refers to property values and you need getter methods (for ReadOnly) and<br>
getter/setter for ReadWrite property. command refers to actions. In your<br>
methods, you can access the morph involved in the player using:<br>
self costume renderedMorph<br>
<br>
The tricky part is that you have to choose unique names for slots, commands,<br>
getters and setters. This is because Player uses a flat name space for all<br>
slot/command names and methods. This may look simple, but you could have<br>
packages loaded from outside that could introduce name clashes.<br></blockquote><div>So do all names have to be unique or the category/name combination? </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
BTW, I mistook you for another Steve in my earlier reply. Sorry.<br></blockquote><div>There's another?!? ;)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Subbu<br>
</blockquote></div><br><div>Thanks!!!</div>