[Gambas-user] WAIT command questions.
Benoît Minisini
gambas at ...1...
Fri Nov 19 01:40:13 CET 2010
> On Wed, 2010-11-17 at 00:03 +0100, Benoît Minisini wrote:
> > > In manual for WAIT, it is said that
> > >
> > > If Delay is not specified, the functions processes every events and
> > > returns immediately. In this case, keyboard and mouse events are
> > > ignored.
> > >
> > > i dont understand this.
> > >
> > > What does it mean "the functions processes every event" ?
> > > Which functions?
> > >
> > > We talk about event loop functions?
> > >
> > > Please explain,
> > >
> > > thanks.
> >
> > The wiki page was badly written. Is it clearer now ?
>
> Ok, now i understand it, thanks!
>
> One question more.
>
> The SUBs event_read() such "PUBLIC SUB MySerialPort_Read()" in example
> are raised recursively again and again if WAIT is called from them
> because they are part of event loop or because event loop call them
> again and again?
Because the event loop calls it again and again. You can try something like
that yourself in the code with a Timer: you create a timer with a short delay
(e.g. 100 ms), and in the Timer event handler, you call WAIT with a big delay
(1 second). Then, stop the project in the IDE, and look at the stack.
> How do they work?
How do they work what?
--
Benoît Minisini
More information about the User
mailing list