So you don't think I've forgotten you ...
About the two errors, they are mine and quite obvious
The first is in:
{ Make sure there is a place for the timer }
Last := TimerList.Count - 1;
if not InRange(Row, 0, Last) then
while (TimerList < Last) do // Overloaded operator
TimerList.Add(Nil);
Since
TimerList is a
TObjectList and
Last an Integer and doen't exist an operator to compare them they are, of course, incompatible types!
The intention of that piece of code is to grow
TimerList so that we can safely set/acess TimerList[Row], so the code should have been (doing away with
Last):
{ Make sure there is a place for the timer }
while not InRange(Row, 0, TimerList.Count) do
TimerList.Add(Nil);
but that's not needed at all; we can just simply do:
{ Make sure there is a place for the timer }
if not InRange(Row, 0, TimerList.Count) then
TimerList.Capacity := Row + 1;
The second error, though a bit more subtle is equally stupid:
{ Now set the new timer in its proper place }
TTimer(TimerList.Items[Row]) := TTimer.Create(Self); // Arg cannot be assigned to
NewTimer := TTimer(TimerList.Items[Row]);
with NewTimer do begin
{... set timer properties ...}
end;
Well, of course! What a bad day I had, hadn't I? That should be replaced by:
{ Now set the new timer in its proper place }
NewTimer := TTimer.Create(Self);
with NewTimer do begin
{... set timer properties ...}
end;
TTimer(TimerList.Items[Row]) := NewTimer;
On another note, your code (if you excuse me saying so) is something of a mess (though that is probably because it's still in development, isn't it?) so I decided to start almost from scratch and build a fully working example. It'll take a little, cause I've a pretty busy day but since I started last night and it's almost complete I hope it'll be ready late this afternoon or early evening, including a text explaining (more or less) what it does, how and why it is the way it is (i.e. my reasoning for making things one way and not another).
See you later