[squeakland] Etoys base packages

Bert Freudenberg bert at freudenbergs.de
Fri Aug 27 09:10:53 EDT 2010


On 27.08.2010, at 03:44, Carlos Crosetti wrote:

> What are the Etoys bsse packages?
> 
> Lets say I want to creste an animals hieracrchy and have each animal feature one a image, novenent and sound, as an example my Dog will bark and randomly move from left to right. The Snake to move doing s random walk and a buzz. What are the bdse claeses to subclass from and start wih.

Etoys is an object system without classes. You create scripts for graphical objects directly. There is no hierarchy.

There still is polymorphism. E.g. you can make two objects each having a different script called "move". You can then trigger all "move" scripts. This will work solely on the name of the script. The two objects do not need a "common ancestor" as in some other object-oriented systems.

So just paint a snake and a dog. Give them a move script each, and set it to ticking. Done.

>  I may also add a row into the Supplies tab with my Zoo, o a Zoo flap?

Sure. Just drop an object into the Supplies flap. This will not survive to the next Etoys start however (it would require saving the Squeak image which Etoys users do not normally do).

If you want it preserved, put them in a flap that will be saved with your project. If you enable the flap's "parts bin" behavior, clicking an object inside will create a copy (the Supplies flap is just such a parts bin).

- Bert -



More information about the squeakland mailing list