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/