My application sets an alarm to schedule an automatic database update
sometime in the future.

When the alarm is triggered (sysAppLaunchCmdDisplayAlarm), and if my
application happens to be running, I call FrmCloseAllForms, update the
database, then reload the previously active form.  This is done because the
application may be editing or displaying a record that will be automatically
updated.

Now, here's the problem:  If the user has the Find dialog up when the alarm
is triggered, I can't call FrmCloseAllForms and reload.  This zaps the find
window.  Incredibly, this was discovered by Gremlins!

My solution is to call FrmGetActiveForm and check if the active form is one
of mine.  If it's not, I simply set a new alarm for 10 minutes from now, and
exit.

This works, but I'd like to set the alarm to a much lower value, maybe 10
seconds.

Here's my question:  does sysAppLaunchCmdDisplayAlarm wake up the device if
it's in sleep mode?  If so, I can't use a short retry because it would keep
the device awake.  How about if I use sysAppLaunchCmdAlarmTriggered and nix
further processing?

What are the battery-life implications of waking up the device every 10
minutes all night long?

Any comments on this whole approach?

David Kendall
Ultra Software Systems, Ltd.
http://www.ultrasoft.com

Reply via email to