> From: John Crouch
>
> I looked at Reptoids. Is it a normal thing to use a
> time other than evtWaitForever in the EvtGetEvent()
> function call? I assume this helps me to get more
> nilEvents. Will I also need to use the
> EvtSetNullEventTick() function along with this
> strategy or is this optional? And the last question,
> is a timeout of several seconds ok to use or will
> this impact system performance in other areas?
I answered this privately, but for the benefit of anyone out there that
might have the same questions, here is what I said:
------------
You should take a look at the "Animation Timing" section of
http://oasis.palm.com/dev/kb/papers/1148.cfm.
Answers to your questions:
1. When you use a number (n) less than evtWaitForever, you are telling the
OS to generate a nil event for your event loop at least once every n ticks.
Since nil events can be generated at other times, when your app receives the
nil event, it should check to see if the correct amount of time has elapsed
and, if so, do whatever it needs to do.
2. I don't think you need to use EvtSetNullEventTick().
3. If by using a "timeout of several seconds" you mean setting the second
parameter of EvtGetEvent to several seconds worth of ticks, then that is not
a problem. The OS will generate events in response to user actions, etc.,
regardless of what you set this to. As I said above, this just forces the
OS to send you a nil event after that much time has elapsed, even if nothing
else is happening.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/