The way I understand it (and I use Constructor) is that you assign a default button to the alert form. When the user presses a hard key, your app doesn't exit immediately, instead, the alert handler returns the default button. You then process it as normal, i.e. if they press cancel, then don't delete the record. When you finally make it back to your main event loop, you get the stop event, and quit.
Can't help on how to do this using PILRC, but I hope it helps... Matt At 10:04 AM 6/3/2002 -0500, you wrote: >Create your own 'alert' box with an event handler. Have it trap events you >don't want passed to the OS. That way pressing the buttons won't >immediately exit your app while displaying an alert. >or Save your data before popping up an alert. > > > Hello, > > I am using an alert box to confirm that the user wishes to delete a record > > from a databse. The alert box works fine and so does the buttons. However >if > > the user exits the program via the hardkeys or the home button the record > > gets deleted anyway. I need to define a default so that the record is not > > deleted if the program is exited with the alert box open. Could someone >tell -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
