[Gambas-user] Empty While loop question

Jose J. Rodriguez joe1962 at ...626...
Wed Apr 20 15:04:05 CEST 2005


On Wednesday, 20 de April de 2005 08:52 am, Benoit Minisini wrote:
> On Wednesday 20 April 2005 03:51, Jose J. Rodriguez wrote:
> > On Wednesday, 20 de April de 2005 04:37 am, nando wrote:
> > > Thank you.
> > >
> > > VB has the same problem.
> > > If I need to do pure processing of data for a extended period of time,
> > > then while the code is running, the timer would never fire.
> >
> > Hi:
> >
> > In VB, you needed to execute a DoEvents() every x number of loops to
> > allow other processing to proceed. I haven't yet researched how to do
> > this in Gambas, since I've not used a timer so far (didn't know yet that
> > it was necessary, either).
> >
> > Joe1962
>
> Differences from VB:
>
> 'WAIT' does not process mouse and keyboard events! This way, you can get
> timer events and refresh the GUI without getting input from users.
>
> 'WAIT x' waits for x seconds (can be a floating point number), AND process
> mouse or keyboard events
>
> So, for old VB users, DoEvents() <=> WAIT 0.01 (or any very small value).
> But you should better use WAIT alone.
>
> Regards,

Thanks, Benoit.

Joe1962




More information about the User mailing list