What you see is actually happening, I found it with NetLibSelect. I would
guess from my experience writing operating systems, that sometimes
EvtGetEvent finds events on the que which it processes internally and is
left with no events to return. What I do with my NetLibSelect (using
sysFileDescStdIn) is to do the EvtGetEvent with a time of 0 and if it
returns a nilEvent just ignore it and go back to the EvtEventAvail

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of DIAMOND
JEFF
Sent: Monday, August 21, 2000 18:33
To: Palm Developer Forum
Subject: Is EvtSysEventAvail failing?


In my program, I want to give the OS a chance to process events at one
point,
but I don't want to sleep if there are no pending events.

So I do:

if (EvtEventAvail() || EvtSysEventAvail(false))
        {
        EvtGetEvent(&event, 1); // can't give 0

        // Process event as normal...
        // (And yes, I handle the appStopEvent if needed.  :)
        }

Now, in theory, the tick wait in EvtGetEvent should be irrelevant if the
queue already has an event to process.  But when I set that number high,
the program lost control.  With it set at 1, I'm finding I'm getting
nilEvents!

My understanding is that you don't get nilEvents unless your EvtGetEvent
timed out
while waiting for an event.

But if EvtSysEventAvail(false) works, there should always be an event to

get!
I can't afford to lose a tick of time waiting for a nil Event - any
ideas why my
screening doesn't catch that there are no events?

Thanks!
- Jeff

--
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