(using Delphi Berlin Enterprise)
I have a method defined as:
function TdmPSI.PrepCdsFromFldLst(cds: TClientDataSet; forExport:boolean): boolean;
I was hoping to use something like this do use it in scripter:
Scripter.DefineMethod('PrepCdsFromFldLst', 2, TAtTypeKind.tkEnumeration, nil,
PrepCdsFromFldLstProc, False, 0);
procedure TEDIValidate850Library.PrepCdsFromFldLstProc(
aMachine: TatVirtualMachine);
begin
with aMachine do begin
ReturnOutputArg(
dmPSI.PrepCdsFromFldLst( TClientDataSet( GetInputArgAsVariant(0) ),
GetInputArgAsBoolean(1)
)
);
end;
end;
Of course, it's never that simple: I get "Invalid Typecast" at TClientDataset(...) .
How do I get that first param returned as a TClientDataSet?
Cheers,
EdB