opensubscriber
   Find in this group all groups
 
Unknown more information…

p : palm-dev-forum@palm.lyris.net 27 April 2005 • 9:28PM -0400

Re: Strange error when trying to intercept sysNotifyVolumeMountedEvent
by Miro Pomsar

REPLY TO AUTHOR
 
REPLY TO GROUP




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" <vbontchev@yaho...>
To: "Palm Developer Forum" <palm-dev-forum@news...>
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/

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.