El 26/08/2021 a las 11:58, Michael Van Canneyt via fpc-pascal escribió:


On Thu, 26 Aug 2021, Santiago A. via fpc-pascal wrote:

Hello:

Freepascal 3.2.0. Windows 7-32bits

TMyObject=class   private     fDset:TDataset;    function GetBookmark:TBookmarkStr; ... end;

function TMyObject.GetBookmark:TBookmarkStr; Begin result:=FDset.Bookmark; end;

I get this compiling error:
Incompatible types: got "TBytes" expected "AnsiString"

Nevertheless, /TbookmarkStr/ documentation example assigns bookmark property to a TBookmarkStr variable
https://www.freepascal.org/docs-html/fcl/db/tdataset.bookmark.html

The type used for bookmarks changed over time.

You really must use TBookmark.

I have corrected the documentation, it seems the 2 types were switched when I corrected the documentation when the type actually changed. Sorry about that :/

By the way, BytesOf documentation is also misleading


Michael.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


--
Saludos
Santi

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to