I'm getting a compilation error "Invalid Operands" when compiling my dws script with RTTIVariable types. Is it possible for the following to work?
Declare variable which is a form.
gVar := ScriptUnit.Variables.Add;
gVar.Name := 'MDIForm';
gVar.DataType := SYS_RTTIVARIANT;
gVar.OnReadVar := onGetMDI;
procedure TGuff.onGetMDI(info: TProgramInfo; var value: Variant);
begin
value := TdwsRTTIVariant.FromObject(FMDIForm);
end;
The script does not compile on this line. Seems it wants a string only.
if (length(MDIForm.edit1.Text) = 0) then
All help appreciated