Dane,
Sorry for the confusion. In fact FrmGotoForm is called on a ctlSelectEvent, and
then the handler releases the current record, resets some field text handles to
NULL and unlocks some chunks in response to a frmCloseEvent, it then returns
false to allow the system cleaning the form. However this doesn't happen for
some obscure reason.
When forcing the erasure and deletion of the form on a frmCloseEvent, it
generates an error message saying that the system is reading from an
unallocated memory chunk.
Any idea? Thanks,
Massimo
"Avilla, Dane" wrote:
> You shouldn't be calling FrmGotoForm on your frmCloseEvent. When your form
> receives frmCloseEvent, FrmGotoForm has usually already been called. Your
> form is being told to close in response to FrmGotoForm, which closes the
> current form and loads another form (see the Palm OS Reference for more
> info). You should be calling FrmGotoForm somewhere else, probably on a
> user-input event (like on a ctlSelectEvent, lstSelectEvent, etc). Try not
> calling anything on frmCloseEvent in your code. This will probably
> eliminate your problem.
>
> In my experience, frmCloseEvent should be used for doing things like
> deallocating memory allocated specifically for a form, or for saving
> data/preferences when leaving a form. Calls to the Frm* Palm OS API really
> shouldn't be in frmCloseEvent code.
>
> Hope this helps,
>
> -DGA
>
> > Hi,
> > I am having some trouble with closing a form. My form handler
> > is calling
> > FrmGotoForm(newFormPtr) on a frmCloseEvent and returns false, but the
> > newForm is drawn on top of the previous form. So it looks like the
>
> ---
>
> This server is using the evaluation version of the Newsgroups
> Interface, making messages limited to 1000 characters. This limitation
> can be removed by upgrading to MultiView.
> See http://www.lyris.com/ for upgrade information.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/