Hi,
try calling FrmSaveActiveState(&frmState) before FrmGotoForm() and
FrmRestoreActiveState(&frmState) after.
Regards,
Miro Pomsar
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of
>Andreica Cristian
>Sent: Thursday, February 02, 2006 22:16
>To: Palm Developer Forum
>Subject: Alarm problem
>
>Hello.
>I am trying to set an alarm for my app.
>All seems to work fine :
>the app is launch at the specified time, and i can use it, but
>when i try to close the app, a white (blank) screen is showed
>and the "Menu" button doesn't work!
>I can us my palm only after i launch an application using one
>of the functional buttons.
>
>Thank you.
>Here is a piece of launching code:
>
>static UInt32 StarterPalmMain(UInt16 cmd, MemPtr cmdPBP,
>UInt16 launchFlags) { LocalID dbID;
>UInt16 cardNo;
> error = RomVersionCompatible (kOurMinVersion, launchFlags);
> if (error) return (error);
>
> switch (cmd)
> {
> case sysAppLaunchCmdNormalLaunch:
> error = AppStart();
> if (error)
> return error;
>
> FrmGotoForm(MainForm);
> AppEventLoop();
> AppStop();
>
>//SET THE ALARM
> SysCurAppDatabase(&cardNo, &dbID);
> AlmSetAlarm(cardNo,
>dbID,1,TimGetSeconds()+5,true);
>
>
> case sysAppLaunchCmdDisplayAlarm:
> error = AppStart();
> if (error)
> return error;
>
>
>AlarmTriggered((SysAlarmTriggeredParamType*)cmdPBP);
>
> FrmGotoForm(FrmForm);
> AppEventLoop();
> AppStop();
> break;
> default:
> break;
>
> }
> return errNone;
>}
>
>void AlarmTriggered (SysAlarmTriggeredParamType * cmdPBP) {
> cmdPBP->purgeAlarm = true;
>}
>
>
>--
>For information on using the PalmSource Developer Forums, or
>to unsubscribe, please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/