Create a global variable that delermines whether or not you allow an exit from your application:
Boolean bAllowAppExit;
Then whenever you show an alert or calender etc make sure that the variable is set to false. In your event loop, stipulate that this variable must be set to true to allow an AppStop event:
do { EvtGetEvent( &event, 2000 ); // more code
}while(event.eType != appStopEvent || bAllowAppExit==false);
I know its convoluted but it should work. I used it to prevent a user from exiting my application during a FrmCustomAlert type situation.
Regards,
Ger
From: Ralf Dietrich <[EMAIL PROTECTED]> Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Subject: Re: Handling the contrast button on Palm V and Palm IIIx Date: Thu, 27 Mar 2003 12:43:31 +0100
Prashant Jha wrote:The cause is that FrmCustomAlert() has its own event handler, and you can't filter on your EventLoop(). I have notice this behavior in my application that changes the LCD-controler of the palm, so that these message box does not appear on the screen. The only solution is that you switch to a "safe"-mode, before calling these routines...But the problem is that it works when we have a regular form on the screen, but not when we have an alert box or a date picker on top of the form. This is the real issue. The application crashes when we press the contrast adjustment button while there is an alert box open on top of my screen. Does anyone have any ideas?
Ralf Dietrich
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/