[fpc-pascal] TTimeStamp and TBCD properties of a class cannot published?

Gerard Visent gerardusmercator at gmail.com
Fri Aug 19 12:59:35 CEST 2011


Hi all,

I am developing a new app using a persistence framework initially developed
for Delphi.
The following code doesn't compile:

published
    property AsTimeStamp: TTimeStamp read GetAsTimeStamp write
SetAsTimeStamp;


published
    property AsBCD: TBCD read GetAsBCD write SetAsBCD;

The compiler error is:  Error: This kind of property can't be published
If I move the properties declaration to the public section of the class
declaration,it's fine.

The class implements an interface of the type:

  // Interface to provide access to attribute as TimeStamp
  IAsTimeStampAccess = interface(IInterface)
  ['{257D2135-478A-4D46-918F-289678567B7F}']
     function GetAsTimeStamp: TTimeStamp;
     procedure SetAsTimeStamp(const aValue: TTimeStamp);
     property AsTimeStamp: TTimeStamp read GetAsTimeStamp write
SetAsTimeStamp;
  end;

But it works for string, integer and other basic type properties.

Is this a bug?

Best regards,

Gerard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110819/e9c945fd/attachment.html>


More information about the fpc-pascal mailing list