[Squeakland] Making a Copy of an eToy from a script and using the mouse pointer to activate an eToy script

Offray Vladimir Luna Cárdenas offray.luna at javeriana.edu.co
Tue Nov 14 13:08:02 PST 2006

Hi Scott :),

Scott Wallace escribió:

> Hi, Offray!
> Once you have typed in textual code for a script, you cannot return to 
> tile mode without losing the textual code you typed.  There is no 
> automatic translation from user-entered textual code back into etoy 
> tiles.  Indeed, the constructs supported by etoy tiles represent but a 
> tiny fraction of what can be expressed in textual Smalltalk code.
> Some people are quite disappointed, and even offended, when they first 
> learn this brutal fact.  But "etoys" is a tile-scripting system, with 
> severe and intentional limits to vocabulary, sentence structure, 
> expression structure, and control structures.  The textual-scripting 
> alternative provides nothing more than a "keyhole" which allows some 
> people to "escape" from tiles, into textual Smalltalk programming, 
> specifically to program things that cannot be expressed with tiles.

Well... its a shame for that people. I'm quite happy with Squeak as a 
whole (including this community). Knowing Squeak is some kind of life 
changing experience and I can understand the limitations of eToys for 
the sake of the learning process of its primary users. Me and my class 
have enjoyed a lot the eToys system... and now we're going to textual 
scripting with happiness :).

> Because reverting from a textually-entered script back to tiles is 
> destructive, the user is presented with a warning if he tries to do it 
> -- a stern warning that any code he has manually entered via the 
> keyboard for this script will be lost.
> The reason why this warning was not presented when you tried to click 
> the text/tiles checkbox of the #chooseMessageTarget script to revert 
> to tiles is because of a bug that appears when you attempt to toggle a 
> textually-coded script which has never had any non-empty tile code.  
> (I have a fix for that bug, which I'm about to publish to the 
> Squeakland alpha update stream.)

¿So, you created #chooseMessageTarget script without using the visor of 
the world?. I see that trying to drag & drop to create a script from any 
object's visor gives me and script where I can switch from tiles to text 
(destructively) but I can't save the code wrote in text mode. I will try 
to see how can I made the same from the recommended bibliography.

> Actually, it's the "chooseClickTarget" which does all the work, and 
> which causes the system to "hold its breath".
> This breath-holding is not absolutely necessary, it's just that that's 
> how the underlying support for morph-picking has always worked in 
> Squeak -- i.e. totally modally.
> To explore the possibility of relaxing this limitation, I've made a 
> suggested fix and included it in the attached revised version #5 of 
> the StarLemmings project; in this version, things will continue to 
> breathe during target selection.  Please try it out and let me know 
> what you think.

¿So, you have (re)implemented chooseClickTarget?. I really need to learn 
how to do these things. I will try to browse the docs and FreeBooks you 
suggested trying to search the way. The new StarLemming5 its working 
like a charm. I will say to my students to reimplement, copy the object 
from their project to yours, so we can use the code you provide us for 
our lemmings clone :-).

> PS:  Just as an aside, I think that perhaps better than trying to 
> learn Smalltalk by puzzling over little oddball textual snippets such 
> as the one I provided for this project would be to download some of 
> the great and free Smalltalk books (including a nice one in Spanish by 
> Diego) from Stephane Ducasse's wonderful web site, which you probably 
> already know about:
> http://www.iam.unibe.ch/~ducasse/FreeBooks.html
I have tried those approaches before in the context of the course I 
talked in SqueakFest2006 (even consider using the Diego book), but it 
seems to me that is not enough continuity of experience from the 
perspective of a first approach to programming using eToys and tile 
based scripting and the approach suggested by the Books. While eToys are 
a good catch for people not familiar with programming in ages from 6 to 
100, these books, despite of its excellence and good quality, are too 
programmer oriented. It seems that Learning to program with Robots from 
Stéphane is a good starting point and bridge in that sense. I have 
ordered it via amazon and it will be in a religious holy day here called 
"the days of little candles". It's some kind of advance of a Christmas 
gift from me to myself ;-). In  some metaphoric sense  it will be here 
just in time to bring some light about teaching  Squeak to teenagers  in 
a fun fashion, as  eToys do, but with more extensibility as Smalltalk 
do. But your enlightenment and the one of this community has been a 
valuable resource and I hope to count with it in the future and share 
the light here also. Thanks, as always.



Pdt: Would be really nice to have something like "Ligth and Matter" [1] 
free books for Squeak (in the sense of freedom, not price). I hope to 
make some contributions in that sense next semester, from my novice 

[1] http://www.lightandmatter.com/
[2] http://www.lightandmatter.com/area1why.html
[3] http://www.lightandmatter.com/article/sneaky.html

More information about the Squeakland mailing list