At 01:30 PM 11/27/2000, Scott Knight wrote:
>I'm working on a program that will add an appointment to the datebook
>programatically.  The problem is setting an alarm for the appointment.
>Basically, the only time the alarm goes off is when there is an alarm
>already scheduled for a time before the alarm for the appointment being
>added.

The problem is that if you change Datebook's database, how is it to know that it 
changed? It needs to arrange with the alarm manager for the next alarm to go off. I 
suggest you sub-launch the Datebook application to convince it to recompute which 
alarm will be next. Several launch codes should work for this purpose. Have a look at 
PilotMain in Datebook.c to see how the various launch codes are handled, and decide 
which one will do the trick. I'd consider sysAppLaunchCmdTimeChange, 
sysAppLaunchCmdSyncNotify, or sysAppLaunchCmdSystemReset. Some of these do more work, 
such as sorting the database. This is probably best avoided, for performance reasons, 
but it may be a quick and easy way to get the new record inserted at the proper place.
--
Peter Epstein
Palm Inc. Developer


-- 
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