Leaving aside the fact that I agree with the avoid at all costs the exit
button...

If you just add an appStop event it can cause problems when the app is
launched from a card. I think you are better off using a keyDownEvent with a
keyDown.chr of vchrLaunch. 

EventType evtStop;
UInt16 mods = 0;
mods |= commandKeyMask;
evtStop.data.keyDown.modifiers = mods;
evtStop.eType = keyDownEvent;
evtStop.data.keyDown.chr = vchrLaunch;
EvtAddEventToQueue (&evtStop);

Another advantage of going this way is that if you use gremlins to test your
application, posting an appStop event will cause POSE to exit to the
launcher and then you are testing the launcher with gremlins, not your
application (you can, of course, test to see if gremlins is running before
posting the appstop event). However, if you queue up a vchrLaunch character
POSE is smart enough to ignore it when running gremlins...

-Ezekiel

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

Reply via email to