Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Angus Robertson - Magenta Systems Ltd
> You are right, except Tag is less appropriate than the Sender > argument passed to the event handler. Sender always refers to the > component sending the event. I meant tag of sender. Otherwise you'd have 50 nested tests for the correct sender. Angus -- To unsubscribe or change your setti

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Paul
> You only need a single event for all 50 clients, provided you set the > client Tag property uniquely so you know which client fired the event. Yes, and I could use Sender also Thx, Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cg

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Francois PIETTE
>> but a central place would be much nicer, especially if you have a >> lot of clients together (50 +) .. > > You only need a single event for all 50 clients, provided you set the > client Tag property uniquely so you know which client fired the event. You are right, except Tag is less appropriat

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Angus Robertson - Magenta Systems Ltd
> but a central place would be much nicer, especially if you have a > lot of clients together (50 +) .. You only need a single event for all 50 clients, provided you set the client Tag property uniquely so you know which client fired the event. Angus -- To unsubscribe or change your settings

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Paul
> Then derive your own THttpCli from ICS's one and override GetAsync with > version having try/except block and generating a new event of trigering an > existing. Half an hour to do that. Yes, I could do that for every async instruction. Are there any other exceptions that I should catch that you

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Francois PIETTE
>>> I'm trying to handle exceptions of all httpcli into a single procedure. >>> I've have used HttpCli.CtrlSocket.onBgException, but this not fired at >>> all. >>> When I click twice on Button1, I get an error 'HttpCli is busy'. >>> This is normal, but I wan't to intercept this. >>> >>> How ? >> U

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Paul
Yes, but a central place would be much nicer, especially if you have a lot of clients together (50 +) .. Paul - Original Message - From: "Francois PIETTE" To: "ICS support mailing" Sent: Sunday, May 03, 2009 4:30 PM Subject: Re: [twsocket] THttpCli exception ha

Re: [twsocket] THttpCli exception handling in async mode

2009-05-03 Thread Francois PIETTE
> I'm trying to handle exceptions of all httpcli into a single procedure. > I've have used HttpCli.CtrlSocket.onBgException, but this not fired at > all. > When I click twice on Button1, I get an error 'HttpCli is busy'. > This is normal, but I wan't to intercept this. > > How ? Use try/except: