Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug on timer, but not deterministic
Message
From
23/10/2003 05:12:50
 
 
To
22/10/2003 06:44:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00840948
Message ID:
00841451
Views:
22
Fabio,

There's something else that you have yet to discover. I found it a couple of years back. (vfp6sp5)

It may happen that the timer event fires in the middle/midst of a from/grid refresh() (think if you have dynamic...Color with udf's)

Sometimes, within the timer() event this may refer to the object which code is being interrupted.

I have found this to happen on very busy or slow computers when the refresh takes a long time

In order to get around that, you have to skip a cycle.

eg
Timer.Timer()

local obj
obj = this

if( Proper(obj.BaseClass) == Proper('Timer') )
   obj.Enabled  = FALSE	&& stop timer event

   ....

   obj.Enabled = TRUE	&& restore timer event
else
   && skip a cycle
endif
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform