I using RemObjects Pascal Script component for Delphi XE, i've the following code:
type
ITest = interface(IInterface)
['{7762A355-052F-449D-8347-01B59E2D2738}']
procedure Execute;
end;
TTest = class(TInterfacedObject, ITest)
private
procedure Execute;
end;
procedure TForm1.Button3Click(Sender: TObject);
var T: ITest;
o: TPSScript;
begin
T := TTest.Create;
o := TPSScript.Create(nil);
try
o.Script.Text :=
'begin ' + sLineBreak +
' T.Execute; ' + sLineBreak +
'end.';
Execute(o);
finally
o.Free;
end;
end;
My question is how to register the interface variable T (instance of ITest) into pascal script so that I can invoke the T.Execute in pascal script?