Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many timers are TOO MANY?
Message
From
21/07/2004 11:48:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00926585
Message ID:
00926590
Views:
21
In my own system, I created text files (for previewing reports in text mode), and deleted them after 5 minutes, IIRC (this gives an external program time to open the file, before it is deleted!).

Depending on user habits, this might create quite a lot of Timers in the Timer array. I didn't notice any problems here (note that each Timer fires only once, then suicides).

However, several other developers here in the UT talk of possible instability; so if I had to start afresh, I would probably redesign, to use fewer timers - preferably only one. Also, if I were still employed by that company, I might do the redesign anyway, just in case. However, it wouldn't be my #1 priority.

>Hi everyone!
>
>I've recently 'inherited' a legacy system and was suprised to discover that the programmer who converted it from 2.6 to VFP has no less than 8 (yes 8!) timers on the main form. The main form has a grid on it and these timers mainly contain code to interact with the grid (i.e. Resize, Refresh, Navigation, Columnsize, etc.). Some of the timers are at the container class level and some are at the form level. They are turned on and off based on different criteria.
>
>My knee jerk reaction is to move the code into one or two timers and use flags and counters to determine if and when code fires, but I was just curious if anyone has this number of timers going at once in their apps and if so what problems can occur?
>
>Our clients are also having a problem with the system locking up at times when other forms are called from this main form. I've tried to track down the reasons but so far haven't been too successful. I changed one form from being created with 'createobject' to just being called with do form 'formname' and this seems to have decreased the problem some but it still is occurring. It seems to be more frequent on newer, faster computers.
>
>Even though the timers on the main form appear to all be off (i.e. interval = 0) when the second form is called, I can't help but wonder if my problem could be related to all these timers being in the main form.
>
>Any help or insight would be greatly appreciated!!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform