View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003561 | JEDI VCL | 00 JVCL Components | public | 2006-03-06 04:13 | 2006-04-07 06:49 |
Reporter | Ramengo | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 3.10 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003561: JvTFAlarm doesn't trigger | ||||
Description | On a new form put a TJvTFScheduleManager and a TJvTFAlarm, then connect them by setting the SchedulerManager property of TJvTFAlarm to JvTFScheduleManager1. On the OnCreate event of the form, write the following: begin Appt:= JvTFScheduleManager1.dbNewAppt(''); Appt.Persistent := True; with Appt do begin SetStartEnd(Date, Time+2/24/60, Date +1, Time); //two minutes later AlarmEnabled:= True; AlarmAdvance:= 1; Description:= 'Test'; end; end; On the OnAlarm event of JvTFAlarm1, write: begin Caption:= 'Fireing alarm ' +AAppt.Description; end; Run the application and wait for at least two minutes: no caption change will happen. Why ? | ||||
Additional Information | I've followed the "JvTFAlarm problem" thread on JVCL forum and done the substitution "FCurrentDate := 0;" as indicated, but still the alarm is not triggering. | ||||
Tags | No tags attached. | ||||
|
You MUST set the property Resources of the TjvTFAlarm to the list of schedules that you want the alarm to work on. Once this is done, only the Appts that are on this Schedule will trigger. Hence, change the OnCreate code to this: var Appt : TJvTFAppt; begin JvTFAlarm1.Resources.Add('bob'); Appt:= JvTFScheduleManager1.dbNewAppt(''); Appt.Persistent := True; with Appt do begin Appt.AddSchedule(JvTFAlarm1.Resources[0]); SetStartEnd(Date, Time+5/24/60/60, Date +1, Time); //two minutes later AlarmEnabled:= True; AlarmAdvance:= 1; Description:= 'Test'; end; end; With this, it works just fine, as it is designed to do. |