The timeout parameter of EvtGetEvent does not guarantee a nilEvent to be
generated every timeout ticks, only that a nilEvent will be generated IFF(if
and only if) no other events have been generated after timeout ticks.
That means you could either
1) decrease timeout to increase the possible frequency of nilEvents or
2) (AA's suggestion) check to see if its time to do your periodic function
every time an event is generated and just use EvtGetEvent to make sure an
event is generated every timeout ticks (so whether its a nilEvent or
PenEvent, etc. your function will fire)
I use #1

Poser does generate more nilEvents than an actual Palm device.  IMHO I like
it, it helps to debug my nilEvent handling.
The UI also uses nilEvents to 'drive' some of controls so don't return true
if you do handle the nilEvent (it could temporarily mess up the UI)

was that kind enough? ;-)

----- Original Message -----
From: "Dan Samber" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, August 11, 2000 7:34 PM
Subject: evtGetEvent, POSE and confusion


> Hi!
>
> This is my first post so please be kind.
> I am trying to do something which has apparently been done many times
over:
> Namely: "Respond to events that are generated every x ticks."
> I have read many posts on this topic in the archive and they have gotten
me maybe 50% there.
>
> My current situation is that I have a program that makes use of
evtGetEvent and have set up
> a place to catch the nilEvent in the switch of my MainFormHandleEvent and
generate more events.
> My problems are as follows :
>
> 1. While a couple nilEvents are "caught" while running under POSE, NOTHING
happens on
> my Visor! I have stepped through the code and it looks like no nilEvent is
being generated!
> Or maybe it's getting handled elsewhere?
>
> 2. Even under POSE, successive evtGetEvent calls are (apparently) not
"getting through"....
> I would go into more detail, but I don't think it's worthwhile given item
#1 above.
>
> If some kind soul could email me some working code that just makes a
metronome or clock of some kind
> I will name a child after them.
>
> Thanks!
>
> Dan
>
>
>
>
> --
> 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/

Reply via email to