Dave Nadler wrote in message <6890@palm-dev-forum>...
>
>Hi all, I'm puzzled by something which I can't find discussed in
>the documentation. Consider the following:
>
>- my application starts modal dialog (frmAlert or frmDoDialog..)
>- user presses hardware button to launch another app
>
>What is *supposed* to happen ? It seems that my app never
>gets a chance to clean up. Is this supposed to be prevented,
>so that the user cannot select another app until responding
>to the modal dialog ?
>
>Is it considered bad form to use a modal dialog unless all
>resources are returned to the OS ? Is this a common
>source of memory leaks ?
You missed FrmPopupForm() (which I prefer to frmDoDialog()).
In the normal course of events, when you're popup is done you
use FrmReturnToForm() to go back where you came from. Your
form does -not- get a frmCloseEvent in this case. BUT -- if your
app is switched, your form -does- get a frmCloseEvent, so I implement
the cleanup code in a subroutine that is called both when I get a
frmCloseEvent
or if somebody presses the button that ends up invoking FrmReturnToForm().
I -presume- that something similar could be done for FrmDoDialog(),
that is I would guess that it will get a frmCloseEvent under these
circumstances. Perhaps somebody else could confirm this?
--
-Richad M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html