[Squeakland] getting code from a .txt file into a script

Gary Frederick gary.frederick at jsoft.com
Tue Mar 23 06:13:26 PST 2004


Howdy,

I am about ready to show the kids Squeak tomorrow. One thing I would 
like to know how to do is how to read a .txt file that has code into a 
project (is that how to 'say' what I want to do?)

I will have some examples I will want the kids to have as scripts. Say I 
have a text file that has this in it.

box
   self forward: 100.
   self turn: 90.
   self forward: 100.
   self turn: 90.
   self forward: 100.
   self turn: 90.
   self forward: 100.
   self turn: 90

I want to be able to read it into a script in a project like the script 
project in the Worlds of Squeak.

This is a class of kids that are playing with robots. They have been 
working with programming LEGO robots and with a simulator. I am 
interested in taking their programs and translating them into a script 
they can use in Squeak... if I can get the .txt files into scripts.

I'll put some scripts into an image and let them each have a copy of the 
image if I don't find out how to go from a .txt file to a script. That 
solution is better than nothing and I can do it by tomorrow :-)

Gary



More information about the Squeakland mailing list