Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-08

TTimeStamp and TBCD properties of a class cannot published?

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Gerard Visent

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.

Reply by email