Tips and Frequently Asked Questions
Using records defined by DefineRecordByRTTI from Delphi code
Scripter has a method named DefineRecordByRTTI which you can use from Delphi 2010 and up to define a record wrapper. It makes it easier to manipulate records, compared to the previous way which doesn’t use enhanced RTTI. When using that method, all records in scripter are represented by the TGenericRecordWrapper class. Thus when received those “records” in a Delphi method via parameter, you need to cast the object to that class and then retrieve the record pointer. Suppose your record type being wrapped is TMyRecord. You’ll need to declare a pointer to it named PMyRecord.
type PMyRecord = ^TMyRecord; procedure TatTestLibrary.__ReadRecord(AMachine: TatVirtualMachine); var MyRecord: PMyRecord; Wrapper: TGenericRecordWrapper; begin //Get the record from the script Wrapper := VarToObject(AMachine.GetInputArg(0)) as TGenericRecordWrapper; MyRecord := PMyRecord(Wrapper.Rec); // From now on you can use MyRecord to access the record. end;
Pricing
Single Developer License
Small Team License
Site License
TMS Scripter
€ 190
€
60
yearly renewal
license for 1 developer
MOST POPULAR
BEST VALUE
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.