FieldByName.AsFloat not working

Using Delphi 10.2.3 (or XE8) a scriptfunction that calls dataset.FieldByName('xxx').asFloat gives an error when compiling the script.
The TatScripter is prepared by this lines :
   atScripter1.DefineClassByRTTI(TDataset);
   atScripter1.AddObject('Table', ClientDataset1);

This is the script :
// try to get contents of floatfield from table
function getFieldContents;
begin
    Result := table.FieldByName('XYZ').AsFloat;
end;

On compiling the script, I get the error
unknown member identifier : AsFloat

I have prepared a demo project.
If you are interested in it, please tell me how to upload.

Regards
Gerhard Sachs

Hello Gerhard, AsFloat is a method of TField, so you can register it as well:




   atScripter1.DefineClassByRTTI(TField);

Yes, it worked.
 I changed the application from the old method to RTTI, it is much easier to handle.
Thank you
Gerhard Sachs