Did you try FrmPopupForm() ?
You can then use FrmReturnToForm(). However this call will fail if there is
no form to return to. Then just send your form the frmCloseEvent (if
needed), and unload the form by FrmDeleteForm().
regards,
Miro Pomsar
----- Original Message -----
From: "Dr. Vesselin Bontchev" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Wednesday, April 27, 2005 14:37
Subject: re: Strange error when trying to intercept
sysNotifyVolumeMountedEvent
> My *guess* is that the crash happens for the following reason:
>
> According to the documentation, FrmGotoForm "Sends a frmCloseEvent to the
current form" - but if the application isn't running, it isn't showing a
current form.
>
> If this is the reason for the problem, how should I fix it? How can I do
the rest of what FrmGotoForm does (send a frmLoadEvent and a frmOpenEvent to
the specified form) without sending a frmCloseEvent? I *do* call FrmInitForm
in AppEventLoop:
>
> void AppEventLoop (void)
> {
> EventType event;
> UInt16 event_error;
> UInt16 formId;
> FormPtr frmP;
> GlobalsPtr myGlobals;
>
> myGlobals = GetGlobals ();
> do
> {
> EvtGetEvent (&event, myGlobals->eventTimeout);
> if (SysHandleEvent (&event))
> continue;
> if (MenuHandleEvent (0, &event, &event_error))
> continue;
> switch (event.eType)
> {
> case frmLoadEvent:
> formId = event.data.frmLoad.formID;
> frmP = FrmInitForm (formId);
> FrmSetActiveForm (frmP);
> switch (formId)
> {
> case kScanningMemoryCardForm:
> FrmSetEventHandler (frmP,
ScanningMemoryCardFormHandleEvent);
> break;
> default:
> break;
> }
> default:
> FrmDispatchEvent (&event);
> }
> }
> while (event.eType != appStopEvent);
> }
>
> Perhaps I should use FrmPopupForm instead of FrmGotoForm when receiving
the notification? But doesn't that work only for modal forms?
>
> Regards,
> Vesselin
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/