Tach an alle
ich kann mir die Fehler nicht erklären. in Abwechslung kommen die
Exception 1 und 3.
was mache ich falsh..!?
Delphi-Quellcode:
procedure TClientClass.PDellLogOutFromDownLoadQueue;
var
i, n : integer;
TempKon : PTKontakt;
tempFile : PTDFile;
begin
try
for i:=0
to Download.Count - 1
do
begin
if (TDFile(Download.Items[i]^).StatusQueue = cLogOut)
then
begin
//loschen alle verbindungen
for n := 0
to TDFile(Download.Items[i]^).From.Count - 1
do
begin
try
TKontakt(TDFile(Download.Items[i]^).From.Items[n]^).Verbindung.Free;
tempKon := PTkontakt(TDFile(Download.Items[i]^).From.Items[n]^);
Dispose(TempKon);
TDFile(Download.Items[i]^).From.Delete(n);
except
on e :
Exception do showmessage('
Exceptio on TClientClass.PDellFileFromDownLoadQueue 1 ' + e.
Message);
end;
// try -except
end;
// for n
try
TempFile := Download.Items[i];
Dispose(TempFile);
Download.Delete(i);
except
on e :
Exception do Showmessage('
PDellFileFromDownLoadQueue 2 ' + e.
Message);
end;
// try -except
end;
// if
end;
// for i
except
on e :
Exception do Showmessage('
PDellFileFromDownLoadQueue 3 ' + e.
Message);
end;
end;