Hi, I want to perform an animation on screen (the drawing of a Kanji (Japanese) character on the screen) and I want the user to be able to stop it. By clicking on a stop button.
However while my animation code is running the system is not responding to events, how should I handle this, is there a way to "yield" to the stystem event loop to give it a chance to react?
Two ways work:
1) Make your animation a state machine driven by nilEvents from the system, and have the main event loop call EvtGetEvent with a timeout of (0) while you're drawing to have it return immediately with a nilEvent if there are no pending events.
2) Put a copy of the event loop in your animation loop, doing the same thing as above, but without returning up through your code.
-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
