I had a similar problem. Basically you have to separate the "timer
calculation" part from the "timer display" part. Use your logic for "if
(MenuHandlerEvent)" to control the drawing and put the other part back where
you had it in the first place.
It would help if you posted a snippet of your code (sorry but I do not have
mine with me).
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert
Purcell
Sent: Wednesday, August 01, 2001 12:53 PM
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/
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/