[Lazarus] Asyncronous socket error lNet
Howard Page-Clark
hdpc at talktalk.net
Sun Sep 28 23:55:37 CEST 2008
Usuario AnĂ³nimo wrote
>I get an asyncronous socket error.
>
> This is my code.
>
> procedure TForm1.Button1Click(Sender: TObject);
> var
> Item: string;
> begin
> System.Assign(DataModule1.ItemFile,'items.txt');
> System.Reset(DataModule1.ItemFile);
> repeat
> System.Read(DataModule1.ItemFile,Item);
>
> DataModule1.LTCPComponent1.SendMessage(Item,DataModule1.LTCPComponent1.Iterator);
> until EOF(DataModule1.ItemFile);
> System.Close(DataModule1.ItemFile);
> end;
I don't know what a LTCPComponent is. But you could try replacing your repeat ... until loop with:
while not EOF(DataModule1.ItemFile)
begin
...
end;
Howard
More information about the Lazarus
mailing list