Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding Timers Part Duex
Message
From
14/08/2004 22:06:47
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00932987
Message ID:
00933392
Views:
20
>
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform