View Issue Details

IDProjectCategoryView StatusLast Update
0003561JEDI VCL00 JVCL Componentspublic2006-04-07 06:49
ReporterRamengoAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version3.10 
Target VersionFixed in Version 
Summary0003561: JvTFAlarm doesn't trigger
DescriptionOn 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 InformationI've followed the "JvTFAlarm problem" thread on JVCL forum and done the substitution "FCurrentDate := 0;" as indicated, but still the alarm is not triggering.
TagsNo tags attached.

Activities

obones

2006-04-07 06:49

administrator   ~0009019

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.

Issue History

Date Modified Username Field Change
2006-03-06 04:13 Ramengo New Issue
2006-04-07 06:49 obones Status new => resolved
2006-04-07 06:49 obones Resolution open => no change required
2006-04-07 06:49 obones Assigned To => obones
2006-04-07 06:49 obones Note Added: 0009019