[etoys-dev] SQ-903 - Object displayed name does not always match name used to refer to object in scripts

Steve Thomas sthomas1 at gosargon.com
Tue Mar 1 00:51:53 EST 2011

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20110301/e15f3d81/attachment.html>

More information about the etoys-dev mailing list