Hi all,

       I have an alert form in the AppStop function that has a button(Cancel
button), in which upon activation would be expected to return to the
previous form. This situation will occur when a user decides to abruptly
leave an application by pressing the Palm Home button on the device, then
the alert
prompts, and the user can choose to Cancel and return to the form. How can I
achieve this? I tried FrmReturnToForm, FrmSetActiveForm but it won't work
since the command will be in the AppStop() function. Please give me some
ideas.. thanks!

        ** snippet of the switch-case part **
        case SaveChangeCancel:
                frmP =FrmGetActiveForm();  //will execute but eventually exit
anyway since it is in AppStop()
                FrmSetActiveForm(frmP);
                break;


        UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
        Err error;

        error = RomVersionCompatible (ourMinVersion, launchFlags);
        if (error) return (error);

        switch (cmd)
                {
                case sysAppLaunchCmdNormalLaunch:

                        error = AppStart();
                        if (error)
                                return error;
                        FrmGotoForm(MainForm);
                        AppEventLoop();
                        AppStop();
                        break;

                default:
                        break;

                }
        return errNone;
        }

regards,
Edwin


-- 
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