Subject: Re: alarms From: "Meg Walraed-Sullivan" <[EMAIL PROTECTED]> Date: Tue, 2 Sep 2003 01:37:28 -0400
> Just handle the launch code in your application. No big deal. If a > startup alarm notification occurs while you are already running, recognize > it and ignore it!
But the thing is, I don't want to ignore it, I want to switch forms and do all kinds of processing in response to it. I want to change the flow control of the currently running app in response to the alarm (also in the currently runing app) Actually, almost 90% of my program is stuff that happens in response to the alarm. And the palm OS companion documentation says that you don't have access to globals or most of your code in general when responding to an alarm, and so in that case, how could I run all my code?
If your program is already the "foreground" task when you get the alarm, then you have globals.
If not, then your response to the launch code should be to initiate an app-switch to start up your program as the "foreground" task (I'm presuming that you can't handle the launch code as a "background" task)
Once you understand launch codes, which are a powerful aspect to Palm OS programs, this should not be a big deal. Look at the sample source code for programs that handle alarms.
Remember, any launch code for your program will be sent to your program, regardless of whether it is the "foreground" task or not.
Roger Stringer Marietta Systems, Inc. (www.mariettasystems.com)
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
