Hi Robert, I had to put a timer in my program as well. What I did was add
the method that incremented my timer to the "NilEvent" in my forms event
handler. This works pretty well, the timer value doesn't get updated
visually while someone is performing a task however, because NilEvents are
only sent when no other events are in the loop.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert
Purcell
Sent: Wednesday, August 01, 2001 11:53 AM
To: Palm Developer Forum
Subject: Adding a Timer?
Hello everyone,
I'm trying to add a timer to a game that I'm writing. I've added code to
the
EventLoop to call a function that updates the timer at the top of the
screen.
But, I'm finding that while the timer is running, if I pull down a menu, the
timer
continues to update and consequently writes on top of the menu. So, I added
some
code to the EventLoop under "if (MenuHandlerEvent)". This fixed this
problem, but
now I'm finding that if the timer is running and I pull down a menu, the
timer
stops (because of my previous fix) and when I return to the main form from
the
menu, the timer doesn't start back up again....eventhough the
"MenuHandlerEvent"
should now be false.
Furthermore, I'm noticing that when the timer first starts, it tends to jump
from
'00:00' to '00:01' very quickly (less than a second), afterwhich it
increments
correctly in second delays.
Bottomline, I could use some help. Does anyone have some example code of
adding
a timer to the screen that they wouldn't mind sharing with me? I would be
greatly appreciative!!
Thanks!!
Robert Purcell
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/