procedure TfrmALSECServer.tmrALSECTimer(Sender : TObject);
var
i : Integer;
Item : TListItem;
obj : TMyObj;
begin
try
for i := vListView.Items.Count - 1 downto 0 do
begin
Item := vListView.items[i];
obj := TMyObj(Item.data);
if (now - obj.rqTime) > {(1.0 / (24 * 60 * 3)) then//}(1.0 / 24) then
begin
//dispose of record after 1 hour
obj.Free;
vListView.items.Delete(i);
end
end;
//switch off timer if list empty.
if (vListView.Items.Count = 0) then
tmrTimer.Enabled := False;
Except
on e : exception do
begin
ShowMessage('tmrTimer: '+e.message);
end;
End;
end;
The Object and Record used are below:
TMyObj = class(TObject)
id : Integer;
rqTime: TDateTime;
info : TMyDetails;
end;
TMyDetails = record
cValidInfo : Boolean;
Line1 : Widestring;
Line2 : Widestring;
Line3 : Widestring;
....
....
....
Line22 : Widestring;
Line23 : Widestring;
Line24 : Widestring;
end;
If anyone knows how to convert this or of a program which will do it that
would be great.
Thanks
> If anyone knows how to convert this or of a program which will do it that
> would be great.
I wrote an add in for Delphi which does this:
http://cc.codegear.com/Item/21834
You may need to recompile it for your version. Also some people have
had problems installing it automatically so you will have to modify
the registry key manually.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Thanks
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:yj53ystgtdq4$.dlg@dlg.marcrohloff.com...
> Will this work for Delphi 6 as that is what we are using?
No. But you should be able to get it to work on the Delphi 2006 trial
version or the Delphi.NET Turbo Pro edition.
> On Fri, 3 Aug 2007 10:00:35 +0100, Bob99 wrote:
>
> > Will this work for Delphi 6 as that is what we are using?
>
> No. But you should be able to get it to work on the Delphi 2006 trial
> version or the Delphi.NET Turbo Pro edition.
Turbo won't take add-ins, will it?
Trial should, but you may need to recompile as I don't think the
binary format for an add-in is compatible with the non-trial version.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from http://mers.com
> Turbo won't take add-ins, will it?
>
> Trial should, but you may need to recompile as I don't think the
> binary format for an add-in is compatible with the non-trial version.
AFAIK, Turbo Explorer doesn't but Turbo Pro does.