----- Original Message ----- 
From: "Padmini Paladugu" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, April 17, 2004 7:49 PM
Subject: Quitting the running application


>
>
>
> Dear Friends:
> I am developing a game application.In that application if the users wants
to
> quit the game he should be able to do so.
> I have a Menu bar..In the options If select the quit menu the form will
> popup with Quit button and cancel button.
> If I tap the quit button..I need to quit the application..I want to go to
> the home screen.
> I am calling StopApplication method when tap on the quit button..
> Stop application frees all the memory ,closes all forms , and closes all
> data bases,stores preferences.
> But,If I tap the quit button ,I am seeing the Fatal alert:Invalid memory
> chunck pointer.
> Can Anybody please help me what am i supposed to do to close the
> application.
> My code looks like this..
>           case QuitButton:
>                //InitialState();
>                 StopApplication();
>                handled=true;
>                break;

StopApplication() is supposed to have stuff that needs to be cleaned up when
your app is going to shutdown. Its purpose is not to shut the app down.

To shut your app down, post the appStopEvent to the message queue.

 EventType event;
 event.eType = appStopEvent;
 EvtAddEventToQueue( &event );


Vu


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

Reply via email to