Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What could make Timer to stop?
Message
De
05/03/2009 14:03:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01385495
Message ID:
01385936
Vues:
42
>>In addition to all the other suggestion, there is another thing to consider (but proven, yet.)
>>
>>When the timer fires and the timer event is called, the timer object is temporarily disabled. This does not mean the Enabled property is set to .F., but internally. This is to prevent the timer from firing while in the timer event. Now, if you are inside, say, a TRY / CATCH block and an error occurs inside the timer event, it Should raise the error to the Catch statement. In theory, the timer object may not be given the opportunity to reactivate (enable) the timer before leaving the timer event. The only straight forward solution is to put a Try / Catch block inside the Timer event. Therefore even if a error occurs, at least the Timer event will be given the opportunity to finish correctly.
>
>As I just mentioned to Tracy (I should have copied you on that message) the timer that occasionally stops does almost absolutely nothing. I simply shows the progress of seconds (like digital clock). So, I can't see what to TRY/CATCH there.
>
>Thank you for your suggestion.

I see. The Try block would be in the normal code, and timer jumps to the timer event, errors, then the error is raised making it jump back to the normal code to the catch. The event would actually never complete correctly. But if your code is simple, you are probably not having this problem. Either way, it would not hurt to put a Try / Catch block in the Timer event to see if an error is actually occurring. Once you discover the culprit, you can always remove the try / catch statement later.
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform