how to mix scripting with coding?

Ned Konz ned at bike-nomad.com
Thu Apr 4 17:10:45 UTC 2002


On Thursday 04 April 2002 03:40 am, Volker Nitsch wrote:
> hmm, i hoped there is an easy way to expose handmades to
 scripting-tiles.
> something like an description array for a class with the
> tile-descriptions
> and the substitution-code.

There is. Look at the "scripting" protocol on the class side, especially 
additionsToViewerCategories
which defines slots and commands (in categories) for the viewer.
The slot types include primitive types: Number String BorderStyle Color 
Boolean Graphic Sound ScriptName and Menu, 
as well as Player, which is a reference to another Morph.

> Starting with scripting and then learning how to make own tiles by code
> is kind of a meta-toy :)  
> Also, have etoys inheritance? So one could split the car-control in
> speed
> and turning and then keep speed-script but override turn-script?

When you duplicate a Morph its player gets duplicated as well. This is not 
really inheritance, as changes to the original don't affect the new one.

Maybe there's inheritance somewhere else; I'm no eToy expert.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list