Problem in Enable/Disable a Task
Posted: Wed May 11, 2005 3:33 pm
Hello,
I am having problem in enabling/disabling a task. I am using the folowing code but the changes are not getting saved:
var
Index : Integer;
Task: TTaskItem;
begin
for Index := 0 to Scheduler.Count - 1 do begin
Task := Scheduler.Items[Index];
Task.Activate;
if SetActive then //SetActive is procedure parameter
Task.Flags := Task.Flags + [tfDisabled]
else
Task.Flags := Task.Flags - [tfDisabled];
Task.Save;
end;
end;
Any help will be appreciated.
thanks and regards,
Partha
I am having problem in enabling/disabling a task. I am using the folowing code but the changes are not getting saved:
var
Index : Integer;
Task: TTaskItem;
begin
for Index := 0 to Scheduler.Count - 1 do begin
Task := Scheduler.Items[Index];
Task.Activate;
if SetActive then //SetActive is procedure parameter
Task.Flags := Task.Flags + [tfDisabled]
else
Task.Flags := Task.Flags - [tfDisabled];
Task.Save;
end;
end;
Any help will be appreciated.
thanks and regards,
Partha