Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer, too often, too soon
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01428866
Message ID:
01429059
Views:
75
>>>David,
>>>
>>>Thinking of it, I think this one will indeed take care of complication 2 that I mentioned. I have used this.enabled=.f. in the past, but apparently it has not become part of my 'automatic coding style'. I'll try to stick to it in the future. Perhaps they should have made it a native property of the timer class.
>>
>>The Enabled is native property of the VFP Timer base class.
>
>
>I have been in the habit of setting the interval to 0 and when done reset to what it was. Does setting enable to .f. and back to .t. do the same thing?

By and large. Resetting the interval disrupts the original time interval. Suppose the timer started at exactly 3 o'clock and is fired each 5 seconds. After your reset the interval will again be 5 seconds, but not each 5th, 10nd, 15th, etc. second of a minute.

I know that in a previous version (I think it was 3.0) setting the interval to 0 and later doing a reset was the preferred way to go, but that was due to one or more bugs. Those bugs are resolved and now the Enabled property works fine.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Reply
Map
View

Click here to load this message in the networking platform