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

Ned Konz ned at squeakland.org
Tue Mar 23 08:53:31 PST 2004


On Tuesday 23 March 2004 8:34 am, Gary Frederick wrote:
> Howdy,
>
> Mitchell, David [CC] wrote:
> > The Squeakland image hides the File List (or it seems that way to me).
> > So, I have to do a little trick to reveal it:
> >
> > Middle-click on the desktop to show the halos.
> > Click the menu halo (red) to show the world menu.
> > Click "desktop menu..." to show (another, different) world menu.
> > Click "open..." to show the open... menu.
> > Click "file list" to open the file list.
> > Use the tree to navigate to the directory containing the .txt file.
> > Select the file in the top-right pane.
> > In the lower pane, select the code (probably all of it).
> > Right-click and choose "do it" (or press Alt+d or Command+d or...).
>
> Thanks!
>
> > All text in squeak is do-able. When I give Squeak presentations, I often
> > select my presentation text and do-it (even TrueType text, which doesn't
> > have "do it" on its menu supports alt+d). Also, you can browse Smalltalk
> > web sites in Scamper and evaluate expressions right out of the browser
> > pane.
>
> This will do it. And it's agreat suggestion I will follow up with.
>
> Now all I have to do is find out how to "do it". ;-) When I tried it,
> Squeak told me it did not understand what I wanted it to do.
>
> This is an etoy. How do I point at the car object?
>
> I had
>    self forward: 100
> I did it and it did not know what self was (I think)
>
> I then tried putting in the car
>    Car forward: 100
> and it did not know how to #forward
>
> How do I reference an object in an etoy?

Real easy:

if you have the debugHaloHandle preference turned on, you can bring up an etoy 
object's halos, click on the light grey debug handle, and then choose 
"inspect player".

The bottom pane of this inspector will interpret 'self' as the etoy object 
(the player).

Or you can open an empty script, turn on the text mode check box, and then 
enter script text in there and then hit the '!' button to try it.


-- 
Ned Konz
http://bike-nomad.com/squeak/


More information about the Squeakland mailing list