[Gambas-user] Re : How to interrupt a loop ?

serge bouc serge.bouc at ...402...
Thu Sep 28 21:55:28 CEST 2006


comisat wrote :
> i'm sorry, i supposed you let events in your compute code with WAIT
> The documentation is clear on it
> WAIT without delay let events (think DoEvents on VB)
> WAIT with delay get a pause (think sleep call on VB)
>
> comisat
>
>   
Here is what the documentation I have says :
> WAIT [delay] : Calls the event loop. If Delay is specified, does not 
> return until Delay seconds elapse.
> Delay is a floating point number. So, if you want to wait 100 ms, just 
> do:
>   WAIT 0.1
> During the wait, no keyboard or mouse events are processed. Only 
> drawing, timer and file descriptors events, like Process_Write.
This is not so clear to me : apparently, you suggest that I should put a 
"WAIT" *without* delay
in the loop I want to interrupt ? But I tried that, and it doesn't seem 
to work. The result is the same
as with no "WAIT" at all. If I put a "WAIT 0.01" on the contrary, then 
the events (mouse clicks) *are*
recognized.
Probably what happens is that I don't understand enough of computer 
programmers language
to see how this behaviour is explained by the above documentation. Once 
again, I am far from an expert.

Best regards.
Serge.







More information about the User mailing list