In the Companion book, it tells you to set the purgeAlarm field
in the parameter block to true if you don't need an alarm displayed.

I'm trying to do that.

It works fine as long as my app is up when the alarm is triggered, but
if any other app has been launched, I get a fatal error when I attempt
to set purgeAlarm to true.  I really am not sure I need to do this, but
I'd like to.  My code is minimal -- just enough to set purgeAlarm to true:


        DWord PilotMain(Word cmd, Ptr cmdPBP, Word launchFlags)
        {
                Err err = 0;
                
                if (cmd == sysAppLaunchCmdNormalLaunch) {
                        err = RomVersionCompatible(ROMMOSTLYCOMPAT, launchFlags);
                        if (err)  
                                return err;
                        {
                        if ((err = StartApplication()) == 0)
                        {
                                EventLoop();
                                StopApplication();
                                }
                        }
                } else if(cmd == sysAppLaunchCmdAlarmTriggered) {
                        Nightly((SysAlarmTriggeredParamType *) cmdPBP);
                }
                
                return err;
        }       


        void Nightly(SysAlarmTriggeredParamType *cmdPBP) {
                // some code..
----->          cmdPBP->purgeAlarm = true;  // Fatal err on this line
                // a little more code...
        }

Any ideas of what's going wrong would be appreciated...

---
Sean L. Gilley
[EMAIL PROTECTED]
http://www.desert-penguin.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to