Not necessarily. The user might simply be tapping idly over some part of the 
screen that does not contain any controls - e.g., in order to prevent the 
device from going to sleep. Or some other event might be in the event queue 
before the one you're interested in. And, generally speaking, you can't simply 
discard every event that you're not interested in, because it might be 
important that the system sees it.

As I said, your design is wrong. Make your form event-driven and execute a 
small part of the loop every time the form's event handler receives a nilEvent. 
If necessary, use a state machine as Logan suggested to break your loop into 
parts.

Don't try to do clever things with the event queue outside your main event 
loop. I tried to do that when trying to implement scanning of the memory card - 
and it didn't work; I ended up writing a non-recursive directory tree scanning 
algorithm that I could execute one step at a time on every nilEvent. Doing what 
you need in an event-driven way might be counter-intuitive - but, at the end, 
it is easier to do correctly in this environment - easier than any other 
non-standard tricks, I mean.

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

Reply via email to