My code creates several TidTCPClients and then adds references to them in a TThreadList.
I was hoping to send commands to all of them by then using
for I := 0 to (NumClients - 1) do
begin
ClientList[I].IOHandler.WriteLn('Whatever');
end;
(that’s obviously only a small part of the code).
However I’m getting two errors:
[DCC Error] Client.pas(261): E2149 Class does not have a default property
[DCC Error] Client.pas(262): E2233 Property ‘IOHandler’ inaccessible here
and after a brief read of This I’m none the wiser about how to do this, but definitely beginning to think that I’m on the wrong track entirely.
Can anyone point me in the right direction?
See doc how to operate
TThreadList. You also need to type cast theTidTCPClientobjects in the list since it only contains untyped pointers.