nilEvents are used by the OS for things such as the UI so you will get them
depending on the OS version and which controls are visible.  Try adding a
statement to check the time (in ticks or seconds) in order to determine if
proper amount of time has elapsed to perform your task.  I would also
increase the frequency that you wish to receive the nilEvent in case the OS
happens to file one off before your event is ready to be triggered (and thus
have to wait upwards of another 8 seconds).  Try one or two a second.

----- Original Message ----- 
From: "Stefan Lange-Hegermann" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 2004 5:50 AM
Subject: SysTicksPerSecond in main event loop


Hi!

I have the following siple event loop:


UInt32 eventWait;

eventWait=SysTicksPerSecond*8;

do {
                 UInt16 MenuError;
                 EvtGetEvent(&event, eventWait);

                 if (! SysHandleEvent(&event))
                   if (! MenuHandleEvent(0, &event, &MenuError))
                     if (! AppHandleEvent(&event))
FrmDispatchEvent(&event);

             } while (event.eType != appStopEvent);


Only my old IIIxe waits 8 seconds, my Cli� TJ-37 fires a nilEvent
almost exactly every one second. Where does that event come from? Any
Ideas?


Stefan

-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to