Aber egal wie ich es drehe:
Programm kommt nicht mal in GetProp :(
Delphi-Quellcode:
function TTemplateParser.GetProp(Instance: TObject; ClassType: TClass; const PropName: String): Variant;
begin
Result := 0;
if PropName = 'MirrorCount' then
Result := IMirrorController(Instance as TMirrorController).MirrorCount;
end;
function TTemplateParser.Exec(s: string): string;
begin
Result := '';
with FfsScript do
begin
with AddClass(TMirrorController, 'TMirrorController') do
// with AddClass(TMirrorController, 'TInterfacedObject') do // geht genauso wenig
begin
AddProperty('MirrorCount', 'Integer', GetProp, nil);
end;
AddObject('IMirrorController', FITabSheetController.MirrorController as TMirrorController);
ScriptCode z.b.:
Code:
ShowMessage(IntToStr(IMirrorController.MirrorCount));