I have a question about the use of the Win32::GUI::Timer-Object. I would be
glad if someone could give me some advice. I would like to create a timer
which gets fired once every second. What I did was:
$Window->AddTimer('MyTimer',1000);
sub MyTimer_Timer {
# Some code
}
I found that the _Timer subroutine was called twice in succession every
second. What is it I am doing wrong?
Are you by any chance using Win32::GUI::DoEvents in a loop instead of
Win32::GUI::Dialog? I (and others) have noticed that DoEvents seems to
respond to events twice, i.e., touching a single key puts the same character
twice into a textfield. Since a Timer fires off an event, it would probably
respond to it twice.
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus