Need help on Etoy
raymondasselin at sympatico.ca
raymondasselin at sympatico.ca
Sun Oct 21 16:21:12 UTC 2001
Alan Kay <Alan.Kay at squeakland.org> wrote:
> 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 don't think I'm trying to do something hard, may be I just don't know
yet the way to go
as I don't want to go Text and I don't see what I need in the tile's
lexicon.
For example I have say three actions in a same script and want to do:
script
Morph show (this is action1)
wait 3 seconds
Morph hide (this is action2)
wait 2 seconds
Morph2 followPath (this is action3)
> 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.
This is what I want too, the wait is an action for me like
foo actionWait _ 3
it is only a way to give duration to the precedent action. I don't want
to give the hand to
another process or to another script during that time, this is a part of
the script, and I agree that
the script is atomic.
>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,
Thank you, you gave me a solution I will try your suggestion.
Also, for now, I understand that there is no simple way ' a tile's
lexicon way' to
do it in Etoy.
Raymond
More information about the Squeak-dev
mailing list
|