repeated from the conduit list: You can't stop or predict the nilEvent. The OS uses it for various reasons, not just because of how you set EvtGetEvent. Read the documentation on EvtGetEvent (the 2nd parameter is not an absolute, just a minimum value) and nilEvent ( http://oasis.palm.com/dev/kb/manuals/1729.cfm )
If you're using the nilEvent as a motivator for your app, you will need to make its detection somewhat 'intelligent'. i.e. check the time, make sure enough ticks have passed instead of blindly performing your function. One more tip: don't return true when you do receive/handle a nilEvent. If you do, it can cause the UI to do some screwy things. ----- Original Message ----- From: "Richard Anderson" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[email protected]> Sent: Monday, July 24, 2000 7:40 AM Subject: Unwanted nilEvents keep apearing - Using example from Neils Rhod es Book > Hello, > > I have been trying to use a comms example from Neil Rhodes book. The part in > question is page 264. I have some differences as I am using the new serial > manager and Palm OS 3.5. > > The Problem: > > I have implemented the TimeUntilNextRead function in the same way as the > book. But I get nilEvents even when my form is not initailsed. I then > changed it back to a standard event loop with evtWaitForever, but I still > get a nilEvent, this event occurs when I hit a button and change to another > form. Surely EvtGetEvent should never return a nilEvent when called with > EvtGetEvent. This causes major problems with the example in the book as it > allows serial manager function to be called with an invalid port id (as I > havent yet opened it). > > Thanks > > Richard Anderson > > -- > 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 ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
