[Squeakland] Lack of documentation frustrating
Bert Freudenberg
bert at freudenbergs.de
Sat May 26 02:22:19 PDT 2007
On May 26, 2007, at 0:49 , mstram wrote:
>
> Alan,
>
>
> Alan Kay wrote:
>>
>> Let's see, Oct 31st 2006 to May 25th 2007 seems to be 7 months,
>> not 18 ...
>>
>
> Sorry, Never was great at math ;)
>
> As I mentioned in another message, I was playing with an animation
> tutorial
> that uses the "holder" morph. Well I've searched through this
> forum and the
> wiki and still haven't found anything that documents what a
> "holder" does or
> the fields that are exposed by it's viewer.
>
> I've also been looking at some of the examples on
> http://community.ofset.org/,
> and trying to use Google translate to figure out what's going on
> with the
> examples.
>
> E.g. how to coordinate multiple scripts for multiple characters in an
> animation or simulation.
>
> I assume that I can create a 'master' script and then use something
> like :
>
> ==================
> "Master Script"
>
> currenTime >= nextEventTime ifTrue: [
>
> Character1_script : start_ticking (or whatever the
> "magic
> word would be)
>
> ======
>
> (The logic above is very incomplete .. I'd want to choose from an
> array of
> characters /classes, what I'm looking for is what is the message to
> "start
> ticking" to a "tickable" script ;)
I have the impression you are approaching Etoys from the wrong angle.
It's not about "scripting" or even "programming" in the popular sense.
It's about working with objects. Imagine what you would do if you
were that object - how would you know it's your time to do something?
Trying to implement a centrally controlled event-trigger system in
etoys is certainly possible (there is no formal proof but it's
obviously Turing-complete) but you are working against the system
than within.
That object-centric perspective was perhaps best understandable with
Papert's *mechanical* turtles that you controlled. These original
turtles were not just images on the screen with an x and y position.
Or worse, colors in a 2D grid, or even numbers in an array called
frame buffer. They were actual objects that you could touch and
instruct.
In Etoys it's the same - you create an object and describe its
behavior. When you reference other objects in a script, it's
generally good practice to just observe what they do, rather than
make them do something.
We recently added the option to hide the receiver tile in each line
of a script to make the distinction between "me" and "other" objects
more obvious. Otherwise it's too tempting to have one large central
script that controls the behavior of all objects (which is what
people previously exposed to "programming" often try to do).
So try to rethink your problem if all you had at your disposal where
independent agents that behave on their own. You may be surprised at
what the result will look like :)
- Bert -
More information about the Squeakland
mailing list