Stop looping. ;-)
Your code probably has a loop that keeps looking for new events to process,
so just add a global variable (int Done in the code below), then set it to
True when you want to leave the loop.
static void EventLoop(void)
{
EventType event;
short err;
Done = false;
do
{
EvtGetEvent(&event, evtWaitForever);
// allow the system to handle stuff
if (SysHandleEvent(&event))
continue;
// allow menu to process
if (MenuHandleEvent(NULL, &event, &err))
continue;
// OK, it's for me
// code for your events, they may set Done if the situation warrants
FrmDispatchEvent(&event);
}
while(Done == false && event.eType != appStopEvent);
}
--
-Nullife
"Johnathan Smith" <[EMAIL PROTECTED]> wrote in message
news:61969@palm-dev-forum...
>
> Can someone please tell me how to make a event that
> will shutdown my app!
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/