Chris Antos <[EMAIL PROTECTED]> wrote in message
news:1416@palm-dev-forum...
>
> this "LeaveForm" thing seems to have really caught on, but it's not the
> right way to leave the form.  everyone who uses it seems to have the same
> kinds of problems.  use FrmReturnToForm(0) instead.

As for LeaveForm(), it's straight out of Palm source code for the
Addressbook. They do the same thing with the "Details" dialogue of an
addressbook entry. FrmReturnToForm(0) does not deallocate anything so I
havent' used it. See the following from PalmOS ref. docs.

"FrmReturnToForm does not generate a frmCloseEvent when called from a modal
form's event handler. It assumes that you have already handled cleaning up
your form's variables since you are explicitly calling FrmReturnToForm."

My understanding was that this was for the type of modal dialog that was
totally contained in the resource definition, like an AlertDialog - there
would be nothing to free up with that. Since my dialog is actually a Form
that happens to be modal with some fields and popups that need logic to them
based on user input, I didn't think this would be adequate in releasing the
memory of the form objects on close etc so I decided to do it like the
Addressbook example. Maybe this is wrong, but I started from those examples
and built on them.

Later...





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to