Scripter: Working with Interfaces

If I declare a function on a registered class with a return type of an interface, the scripter won't work with the interface. For example:

type
TNamespace (registered in scripter)
function Apps: IAppInterface;
end;

TAppClass = class(TInterfacedObject,IAppInterface);

function TNamespace.Apps: IAppInterface;
begin
  result := TAppClass.create;
end;

scripter
myNamespace.Apps.AppFunction(1,2); //Object or record required.. for AppFunction.


I have tested that the object exists and was not freed.
TAppClass was registered with DefineClassByRTTI
Not sure how to register an interface with scripter...

Scripter doesn't support interfaces, unless it's a COM interface which implements IDispatch.

Hi Wagner

We seem to have this working by adding IatInterfacedObject to our classes that use interfaces after reviewing the scripter code. Is this an acceptable way of doing this?

Not sure, that's all you did? Made your objects implement IatInterfacedObject? Or did you add/change any other code?