Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is 2nd Timer Event possible while in a Timer Event?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00619247
Message ID:
00619301
Vues:
13
Simon,

>I read the VFP documentation but I could not tell if the timer event can be trigger while in the timer event or is it disabled until the timer event completes. I am trying to trace down a strange experience where the debugger shows a timer control disabled and the timer event still occuring (There is only one timer on the form).

Yes! it does. I encountered that a timer - esp. when interval is short - fires a second time even if it should only once.

What I do ALWAYS is :
PROCEDURE TIMER
local ln_WasInt
if this.Interval = 0
    return
else
    ln_WasInt     = This.Interval
    this.Interval = 0
endif

.... do my work ...
 

this.Interval = ln_WasInt
ENDPROC
And since I do this, never had problems with timers anymore


HTH

Frank
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform