[Gambas-user] Empty While loop question
Pablo Vera
pvera at ...729...
Wed Apr 20 06:14:58 CEST 2005
The problem is that the WHILE-WEND loop runs continously and doesn't
allow the event to fire.
You need something like this:
WHILE Timer1.Enabled = True 'wait here until timer completes
WAIT 0.1 'allow events to fire
WEND
But if you need to wait a specified amount of time, simply use the WAIT
command like this:
WAIT n
where n is the amount of time in seconds that the program should wait.
Saludos,
Pablo Vera
nando wrote:
> Question...
> Assume there is a timer on the form
> and the following 3-line code fragment is running
> (which is NOT inside the timer sub)
>
> ...
> Timer1.Enabled = True
> WHILE Timer1.Enabled = True 'wait here until timer completes
> WEND
> ...
>
> Public Sub Timer1_Timer
>
> Timer1.Enable = False
>
> End Sub
>
>
> The purpose is to wait a prescribed amount of time, which the
> timer is used for, at which time the timer is disabled and
> the program continues.
>
> Question: Why does the timer event not actually fire??
> -Fernando
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: New Crystal Reports XI.
> Version 11 adds new functionality designed to reduce time involved in
> creating, integrating, and deploying reporting solutions. Free runtime info,
> new features, or free trial, at: http://www.businessobjects.com/devxi/728
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
More information about the User
mailing list