[Gambas-user] Re : How to interrupt a loop ?
serge bouc
serge.bouc at ...402...
Fri Sep 29 17:01:44 CEST 2006
Benoit Minisini wrote :
> That's it.
>
> The documentation is right there. Sometimes it is. :-)
>
> You have a little information on event loop there:
> http://gambasdoc.org/help/cat/eventloop
>
> Regards,
Thanks for the link. I find the explanation on "wait" there much more clear
than what I read before (from the documentation coming with gambas distribution).
Just a quick comparison :
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.
> >
Here is what the above link says :
> *
> *
> WAIT [ _Delay_ ]
> Calls recursively the event loop
>> If _Delay_ is specified, the function does not return until _Delay_
>> seconds elapse.
>> If _Delay_ is not specified, the functions processes every events and
>> returns immediately.
> In this case, keyboard and mouse events are ignored.
> Example
> **' **Waits a little, letting the user interacts with the GUI**
> **WAIT 0.1**
>
> ' **Waits, but the user can just watch what happens...**
> **WAIT**
> **
The main differences that help me to understand this version are
the words "In this case..." (when delay is not specified), and
of course the example.
Thanks again.
Serge.
*
*
-- Benoit Minisini
More information about the User
mailing list