Re: [twsocket] Design problem: function result and getAsync

2005-11-03 Thread Lutz Schröer
Wilfried Mestdagh wrote:
> unit uJob

Thanks. Your piece of code will give me a good start off.

Lutz

-- 
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


[twsocket] Design problem: function result and getAsync

2005-11-02 Thread Lutz Schröer
Hi,

I've got a small design problem with the GetAsync method. My basic 
understanding is that after I called the getAsync method I have to do 
the further processing in httpRequestDone. This is no problem until I 
want to put the code in a different unit. For example:

unit1.pas:
--
function xxx.getResult(): string;
begin
   http.getAsync;
end;

procedure xxx.httpRequestDone(Sender: TObject; RqType: THttpRequest;
  ErrCode: Word);
begin
  // do some result processing
end;


main.pas:
--
[...]
result := unit1.getResult();
[...]

Obviously this can't work. How do I have to design my unit so that I 
create a nice and simple function call in my main program but the actual 
code resides in a different unit?

Cheers
Lutz



-- 
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