Re: events for dynamically created components..?


Posted by Jean Claude Servaye on June 28, 2000 at 17:11:42:

In Reply to: events for dynamically created components..? posted by newB on June 25, 2000 at 02:41:26:

: Hiya,
: Im a beginner.. still :) and trying to learn. I read in one of the delphi books i got about creating components dynamically and i understand that part but i cant seem to find anything about events for components created in such a way.
: What im wondering is like when i dynamically create 3 different clientsockets, how can i make/handle events for them?

Create your sockets, lets says S1,S2,S3.
Then write events handler for your sockets

exemple :
procedure DataSent(Sender: TObject; Error: Word);
...
...
Your code here
...
...
end;

Then assign your handler to your socket:

S1.OndataSend := DataSend;


Repeat for all needed handlers.