EvtSysEventAvail looks for low-level events.  Buttons return higher level
events.  Try EvtEventAvail, which returns true on any event.

Regards,

Steve

-----Original Message-----
From: Feng Wang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 15, 2000 5:20 PM
To: Palm Developer Forum
Subject: Help... How to get low-level system event


Hello,

I run my application with serial communication on the emulator, in
which a do-while loop is used to read  and write data by the serial port. It
looks like working. However, all the icons and the command button on the
screen are disabled, that is, when I click the icons and the command button,
nothing happens. The following is my code,

do{
        if(err == serErrLineErr)
        {
                SerReceiveFlush(eSerialRefNum, 1);
                continue;
        }
                        
        err = SerReceiveCheck(eSerialRefNum, &numBytesPending);
        if(err == serErrLineErr)
        {
                SerReceiveFlush(eSerialRefNum, 1);
                continue;
        }
        
        ErrFatalDisplayIf(err != 0, "SerReceiveCheckFail");
                        
        if(numBytesPending > 12)
        {
                numBytes = SerReceive(eSerialRefNum, theData,
numBytesPending, 0, &err);
                if(err == serErrLineErr)
                {
                        SerReceiveFlush(eSerialRefNum, 1);
                        continue;

                }
                
                //processing the data
                correctReading = true;
        }                       
                        
}while(!correctReading && !EvtSysEventAvail(false));

and I tried to use EvtSysEventAvail() to get the icon or command button
event, but it does not work.  
If I comment this do-while loop, the icon and button work.
I use Code Warrior R6, the Palm OS v3.1 that is uploaded from my Palm IIIe
and the Emulator 3.0a4 Win. 

Could you give me your idea to resolve the problem?

Feng Wang
Email:  [EMAIL PROTECTED]


-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to