Hello

Hello,

this is the first time I try to call an Interface method from TThread.Syncrhonize()...and Berlin don't accept that.

procedure TMyThread.Execute;
begin
Synchronize(AnInterface.OnExecute);
end;

I had to write

procedure TMyThread.Execute;
begin
Synchronize(CallOnExecute);
end;

procedure TMyThread.CallOnExecute;
begin
AnInterface.OnExecute
end;

How should TThread handle this ?

procedure TThread.Execute(?); overload;
begin
end;

of course I can use an anonymous method but they could be a "procedure of interface"...no ?

Comments

Post a Comment