Need help on Etoy
Alan Kay
Alan.Kay at squeakland.org
Sun Oct 21 19:57:19 UTC 2001
How long a delay do you want?
We generally think of the actions in a single script as being
quasi-atomic (c.f. Ken Kahn's recent discussions) and we are still
trying to figure out just what are the best ways to do various kinds
of controls with child programmers. Remember, the etoys are not set
up as a productivity tool, but as a way for kids to learn various
powerful concepts. So we want them to be in contact with a little
more mechanism than might be put in a productivity tool (but we don't
want the mechanisms to be too annoying).
I think of the scripts as being "really concurrent" (they are only
sort of) and all scripts finish their actions within each frame of
their clock. So I like to do sequential stuff as explicit
constructions. I would split up your script into a before-script and
an after-script. If there is a delay, I would make a delay script to
do some kind of count-down. Then you would have three scripts:
--------------------------
foo before
...
...
foo's delayTime <- 5
foo start script delay
---------------------------
foo delay paused
Test foo's delayTime > 0
Yes foo's delayTime decreaseBy 0.5
No foo start script after
foo pause script delay
---------------------------
etc.
---------------------------
You would also want to put in a "pause script" into "before" if it
were a ticking (looping) script.
Notice that this is an example where we could be tempted to put
parameters into Etoys. (I've been tempted many times, but there is a
certain charm in just using instance variables -- and it also
suggests a possible nicer syntax for the kids). We are fooling around
with some of these ideas in the OmniUser scripting.
Cheers,
Alan
At 1:16 PM +0400 10/21/01, raymondasselin at sympatico.ca wrote:
>I'm working with Etoy for a presentation.
>How can we insert delays between two actions in Etoy script?
>Is it possible to do this entirely with Tiles in Etoy? because to switch
>from Tiles to Text is not
>without problems in Etoy...for me.
>
>Raymond
--
More information about the Squeak-dev
mailing list
|