Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding Timers Part Duex
Message
De
14/08/2004 22:06:47
 
 
À
14/08/2004 03:37:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00932987
Message ID:
00933392
Vues:
19
>
>Try moving the code that disables the timer *before* the logging process. The timer could fire several times whilst the disk write is happening.
>

Fabio wanted me to try Timer.Reset, which led me down the path of trying to duplicate the problem simply. Actually the code looks something like this without logging.
Function ProcessMessages
If Not MessageTimer.Enabled
  Return
Endif
.
.
This seems to work on normal to fast machines but was failing on a 233 mhz machine at a client site.

>Even that may not be enough - disabling the timer should be the very first line of the Timer event code. Do you really need to use event binding anyway.
>

This is exactly what I'm doing now and is working on the slow client machine.

The code isn't much different except the MessageTimer Class is created and has a reference to the parent so that it can:
Function Timer
  This.oParent.ProcessMessages()
ENDFUNC
The code is so similar it makes me wonder what is going on under the hood when binding the event.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform