InvalidCastException when working with TBookmark (TDataSet.GetBookmark)

hello, first of all: great product! i use version 7.23
when trying to capture the bookmark of a tdataset in delphi 10.4.2 via the scripting ide i get an InvalidCastException. why is this?

var 
   oBm: TBookmark;
begin
  ...
  oBm := DataSet.GetBookmark; // invalidcastexception
  ...
end;

Thank you!

How did you register GetBookmark method? It's not registered by default, because it returns an TArray<Byte> and that is not supported by scripter.

The way to register it would be maybe register a GetBookmark returning a string, and then converting TArray to string in your wrapper method.

Hello Wagner,
i actually did not register anything at all, apart from the recursive rtti-based registration when registering my TMainForm, which uses DB. i am able to use a lot of tdataset-features - so that's why i was confused about GetBookmark which intellisense suggests within the scripter ide (that's why i thought it was auto-registered)

Maybe it was auto-registered, but the type is not supported. You have to manually register it.