Delphi 5 Ent - Windows 2000
Hello delphi's world,
I have an ambiguos problem and i'm not able to understand the cause it
happens.
Take a look to the piece of code under here. I just make some
elaborations on a TList
object. At every iteration, for time-consuming reason, i call the
ProcessMessage method
of the main Application object.
This code is the click event handler of a button on the MainForm.
I := 0;
bEsciCiclo := False;
While (I <= ListSchiera.Count - 1) and (Not bEsciCiclo) do
begin
ItemSchiera := ListSchiera.Items[I];
if (ItemSchiera.dSched_DataOra <> dDataZero) or
(ItemSchiera.dSched_Part - GL_Inizio_AK_H > Now) then
bEsciCiclo := True
else
begin
NextOperation(ItemSchiera); {Nel caso di anagrafica ho generato
AK ed EP}
ListSchiera.Items[I] := Nil;
ItemSchiera.Free;
end;
Inc(I);
Application.ProcessMessages;
end;
ListSchiera.Pack;
{Ordino la schiera}
OrdinaSchiera;
The problem is:
It doesn't come back after the call to Application.ProcessMessages
so it doesn't do the Pack and Sort calls.
The same code on a Windows NT 4 service pack 6 - Delphi 5 Ent. system
goes rigth.
Grazie anticipatamente per la vostra attenzione