RE: [twsocket] Little question... TList of HTTPCli
In C++ I would do something like this: int index=list->Remove(Sender); If Sender (your httpcli) is in that list, it will be removed, and it will return the index of the position before it is removed if the Sender was in the list. You should see the helpfiles, many examples and usefull hints there.. Regards Bjørnar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ann Sent: 3. mai 2005 13:53 To: ICS support mailing Subject: Re: [twsocket] Little question... TList of HTTPCli yes but im not asking about sender but how do i find this sender in tlist of components... do i have to make something like this or is there easier way? for i:=0 to list.item.count-1 do begin if list.item[i] = sender then this_is_the_one? break; end; - Original Message - From: "Francois Piette" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, May 03, 2005 11:26 AM Subject: Re: [twsocket] Little question... TList of HTTPCli > > Just one little question... > > When i have a TList of busy HTTPCli'ents how do i > > know which one should i > > remove on OnRequestDone event? > > You have the sender argument in OnRequestDone. It's the Http component that sent the event. You can > cast it to THttpCli and do whatever you like. > > btw: This is basic Delphi programming. The sender argument of any event always refers to the > component source of the event. You always need it when the same handler is used for many components. > > -- > [EMAIL PROTECTED] > http://www.overbyte.be > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Little question... TList of HTTPCli
You have TList.IndexOf -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Ann" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, May 03, 2005 1:53 PM Subject: Re: [twsocket] Little question... TList of HTTPCli > yes but im not asking about sender but how do i find this sender in tlist of > components... > > do i have to make something like this or is there easier way? > > for i:=0 to list.item.count-1 do > begin > if list.item[i] = sender then this_is_the_one? > break; > end; > > - Original Message - > From: "Francois Piette" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Tuesday, May 03, 2005 11:26 AM > Subject: Re: [twsocket] Little question... TList of HTTPCli > > > > > Just one little question... > > > When i have a TList of busy HTTPCli'ents how do i > > > know which one should i > > > remove on OnRequestDone event? > > > > You have the sender argument in OnRequestDone. It's the Http component > that sent the event. You can > > cast it to THttpCli and do whatever you like. > > > > btw: This is basic Delphi programming. The sender argument of any event > always refers to the > > component source of the event. You always need it when the same handler is > used for many components. > > > > -- > > [EMAIL PROTECTED] > > http://www.overbyte.be > > > > > > -- > > To unsubscribe or change your settings for TWSocket mailing list > > please goto http://www.elists.org/mailman/listinfo/twsocket > > Visit our website at http://www.overbyte.be > > > > > > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Little question... TList of HTTPCli
yes but im not asking about sender but how do i find this sender in tlist of components... do i have to make something like this or is there easier way? for i:=0 to list.item.count-1 do begin if list.item[i] = sender then this_is_the_one? break; end; - Original Message - From: "Francois Piette" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Tuesday, May 03, 2005 11:26 AM Subject: Re: [twsocket] Little question... TList of HTTPCli > > Just one little question... > > When i have a TList of busy HTTPCli'ents how do i > > know which one should i > > remove on OnRequestDone event? > > You have the sender argument in OnRequestDone. It's the Http component that sent the event. You can > cast it to THttpCli and do whatever you like. > > btw: This is basic Delphi programming. The sender argument of any event always refers to the > component source of the event. You always need it when the same handler is used for many components. > > -- > [EMAIL PROTECTED] > http://www.overbyte.be > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Little question... TList of HTTPCli
> Just one little question... > When i have a TList of busy HTTPCli'ents how do i > know which one should i > remove on OnRequestDone event? You have the sender argument in OnRequestDone. It's the Http component that sent the event. You can cast it to THttpCli and do whatever you like. btw: This is basic Delphi programming. The sender argument of any event always refers to the component source of the event. You always need it when the same handler is used for many components. -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Little question... TList of HTTPCli
> When i have a TList of busy HTTPCli'ents how do i know which one should i > remove on OnRequestDone event? The Sender parameter is the one that triggered the event. -- Sly This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be