>1) Upon receiving the event, parse the structure...
>...
>2) Alternatively (and easier), don't use a button.  Where you'd normally put
>your "Done" button, just place some text that says "Tap the screen to exit"
>or something like that...

Both of these are reasonable and should work as desired.  #1 is a far
better solution for the user - they can just tap on something or press a
hardware button and it does what they want.  #2 is easier for the
programmer but messes with the user's mind and introduces a weird modality
where they find that tapping doesn't work "like it should".

The best way to do these sorts of things that I've found is to do your work
when the computer is idle.  Do a little work, perhaps a half second or
something, and then either check to see if an event is available with
SysEventAvail(), or else just exit up to the event loop and pass a very
short timeout value to EvtGetEvent so that you'll get another nilEvent if
the user (still) hasn't done anything... in which case you continue your
calculation.

This way you get normal UI behavior, without having to rewrite the system
and form event handlers (which is an extremely error prone idea and will do
bad things for compatibility with future releases).

-David Fedor
Palm Developer Support


Reply via email to