event capture, batched screen updates, wait

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

event capture, batched screen updates, wait

Timothy Falconer
Hi all,

Three questions about etoys.

First, is there a way I can capture the event of turning a page in a  
book to fire off a script?   Specifically:

1. click next to go to page4

2. this fires page4.startTheFun

3. click prev, then click next again

4. fires page4.startTheFun again


Second, when looping within a script, it appears that the screen  
updates are batched.  If I do "repeat 10 ... forward 10", it looks  
the same as if I did "forward 100".  Is there a way around this, or  
do all screen updates happen on a clock tick.


Last, is there a way to wait a set amount of time, other than rolling  
my own "wait" using a variable?

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: event capture, batched screen updates, wait

Bert Freudenberg

On Nov 1, 2007, at 6:57 , Timothy Falconer wrote:

> Hi all,
>
> Three questions about etoys.
>
> First, is there a way I can capture the event of turning a page in  
> a book to fire off a script?   Specifically:
>
> 1. click next to go to page4
>
> 2. this fires page4.startTheFun
>
> 3. click prev, then click next again
>
> 4. fires page4.startTheFun again

Don't know - I'll let others answer this.

> Second, when looping within a script, it appears that the screen  
> updates are batched.  If I do "repeat 10 ... forward 10", it looks  
> the same as if I did "forward 100".  Is there a way around this, or  
> do all screen updates happen on a clock tick.

Disable the "batchPenTrails" preference. We now changed the default.

> Last, is there a way to wait a set amount of time, other than  
> rolling my own "wait" using a variable?

Not in this version of Etoys, no.

- Bert -



_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Fwd: event capture, batched screen updates, wait

Kim Rose-2
Scott,

Can your "event theater" help Tim do what he is seeking?

Kim


Begin forwarded message:

> From: Bert Freudenberg <[hidden email]>
> Date: November 1, 2007 3:59:17 AM PDT
> To: Timothy Falconer <[hidden email]>
> Cc: Squeakland list <[hidden email]>
> Subject: Re: [Squeakland] event capture, batched screen updates, wait
>
>
> On Nov 1, 2007, at 6:57 , Timothy Falconer wrote:
>
>> Hi all,
>>
>> Three questions about etoys.
>>
>> First, is there a way I can capture the event of turning a page in  
>> a book to fire off a script?   Specifically:
>>
>> 1. click next to go to page4
>>
>> 2. this fires page4.startTheFun
>>
>> 3. click prev, then click next again
>>
>> 4. fires page4.startTheFun again
>
> Don't know - I'll let others answer this.
>
>> Second, when looping within a script, it appears that the screen  
>> updates are batched.  If I do "repeat 10 ... forward 10", it looks  
>> the same as if I did "forward 100".  Is there a way around this,  
>> or do all screen updates happen on a clock tick.
>
> Disable the "batchPenTrails" preference. We now changed the default.
>
>> Last, is there a way to wait a set amount of time, other than  
>> rolling my own "wait" using a variable?
>
> Not in this version of Etoys, no.
>
> - Bert -
>
>
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: event capture, batched screen updates, wait

Scott Wallace
In reply to this post by Timothy Falconer
Hi, Tim,

If I'm understanding your wish correctly, this might most easily be  
accomplished by designating page4's 'startTheFun' script to be run on  
"opening".

Probably it's currently marked as "normal", so click on that "normal"  
button and select "opening" from the resulting pop-up.

Once you've done that, any time your user "goes to" page4 (e.g. by  
hitting the "next" button while on page 3,) the first thing that will  
happen after the new page appears is that its startTheFun script will  
run.

How closely does that match what you're after?

Cheers,

   -- Scott



On Oct 31, 2007, at 10:57 PM, Timothy Falconer wrote:

> ...First, is there a way I can capture the event of turning a page  
> in a book to fire off a script?   Specifically:
>
> 1. click next to go to page4
>
> 2. this fires page4.startTheFun
>
> 3. click prev, then click next again
>
> 4. fires page4.startTheFun again


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland