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

Benoit Minisini gambas at ...1...
Thu Sep 28 22:06:45 CEST 2006


On Thursday 28 September 2006 21:55, serge bouc wrote:
> 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.
>

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,

-- 
Benoit Minisini





More information about the User mailing list