Jooel - heres the lowdown on the Timer thingy:

First off, in general, we have to remember that Kixtart is an interpreted scripting language, not a compiler (I know you know this - just making a point). And as such, has a certain latency in terms of responding to the real live windows events. Add to that the overhead associated with COM Automation and you can maybe see where I'm "heading" here.

In some of my very early performance test (with the KIXBGI32 component and later on with Kixforms 1.0) I discovered that with a reasonably fast machine (500mhz) - the "minimum" elapsed time to invoke a COM call is roughly about 1 or 2 ms. Then add to that some script processing and the times I've seen can jump to roughly 10 ms or so (like if you inside a small WHILE loop making COM calls).

Anyways - what happens is that when the Timer object is running - it is continously generating windows timer events (say every 10ms or so). And its up to you (us) to "handle" these events in the script (by invoking DoEvents). Well - if your event handler takes longer than 10ms to run - what happens is that there is a backlog of timer events in the queue ... maybe backlog is a bad word ... a series of "missed" timer events can occur.

If you already have an event "waiting" in the queue - and another timer event arrives (because your script is too slow to empty the queue), windows just discards the event in the queue and replaces it with the new one. But - inside that discarded event is the "event string" that we specified in the $Timer.OnTimer property. Windows doesn't destroy that string, so i have to make a change to Forms to handle this situation. And this situation arises only with the timer event - not true for all the other events. I went to great pains to insure that all events in Kixforms are trapped and handled (as you found out with your BBChecker Buddies and History buttons, all clicks are captured!).

Actually - its not a tough change to make but i got my head wrapped-up in ListViews right now. Suspect that improved timers will make their appearance in 2.1.1 or so.

-Shawn

[ 19. September 2002, 14:47: Message edited by: Shawn ]