[etoys-dev] SQ-903 - Object displayed name does not always match name used to refer to object in scripts
sthomas1 at gosargon.com
Tue Mar 1 13:05:41 EST 2011
Thanks, actually what I need is to get the reference to the object from the
What I am trying to do is something similar to Learn Programming with Robots
by Stephane Ducasse <http://rmod.lille.inria.fr/botsinc>. One of my goals
is to find a way to provide a transition for kids from Etoys to Squeak and
for me to play around and have fun ;) In looking a at Ducasse's book, I am
not really sure what value it adds to kids learning other than showing them
the textual syntax of squeak as opposed to the tile version (except the some
of the later chapters which introduce the browser, some debugging with halt,
etc). Also some of the textual descriptions do not seem as effective or
likely to be used by kids as some things that might be done in Etoys.
I really need to think about what for ?Computational Thinking?
habits/experiences I want kids to have and how to create an Etoys that can
facilitate learning them.
I think, this will take me quite a while (but I'm having fun ;).
In any case
On Tue, Mar 1, 2011 at 9:34 AM, Ricardo Moran <richi.moran at gmail.com> wrote:
> Hi Steve,
> I don't think this is a bug. If I understood correctly, the name used to
> reference an object in a script is not supposed to be the same as the one
> displayed on the screen but a unique name that identifies only this object
> in the World. An object's external name can change at any time but the
> references to this object must remain consistent in all scripts.
> I'm not sure what you're trying to do, but you can get an object's
> displayed name by sending #externalName to the object. See the attached
> project for an example.
> On Tue, Mar 1, 2011 at 2:51 AM, Steve Thomas <sthomas1 at gosargon.com>wrote:
>> See: http://tracker.squeakland.org/browse/SQ-903
>> If you change the name of an object, the name used to reference it in a
>> script (via show code textually) does not change.
>> So how do I reference the name of the player (as displayed on the screen)
>> in a script?
>> | t1 t2 p1 selector |
>> p1 := Text3.
>> t1 := Command1 getCharacters.
>> t2 := 5.
>> selector := (t1 , ':') asSymbol.
>> p1 perform: selector with: t2
>> In this above example I had a Text object where the screen showed its name
>> (on page 2) as Text3, but when I used its characters tile in another Text
>> object's script, it used the name Text4 in the text version of that script?
>> etoys-dev mailing list
>> etoys-dev at squeakland.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the etoys-dev