you may try this:
TSomeObjToSerial = class(TPersistent)
private
FPoint: TPoint;
public
property Point: TPoint read FPoint write FPoint;
published
property PointX: Integer read FPoint.x write FPoint.x;
property PointY: Integer read FPoint.y write FPoint.y;
end;
not tested by compiler, bu
Thank you -- this is excellent information, both RTTI for records and
lazarus/components/jitclasses/ . So I really have all the puzzle
pieces I need :)
I have recorded a TODO to handle it all in
https://castle-engine.io/roadmap#records_rtti .
Regards,
Michalis
niedz., 18 sie 2024 o 10:49 Michael
On Sat, 17 Aug 2024, Michalis Kamburelis wrote:
Thanks Michael!
OK, that's partially good news :)
I understand that streaming records by default to LFM would lead to
too many questions (and I'm unsure whether Delphi does it too, for
records and DFM).
It does not.
Streaming has not change
Thanks Michael!
OK, that's partially good news :)
I understand that streaming records by default to LFM would lead to
too many questions (and I'm unsure whether Delphi does it too, for
records and DFM). If this means they are not allowed in the
"published" section, *but* the RTTI is capable of te
On Sat, 17 Aug 2024, Kostas Michalopoulos via fpc-devel wrote:
On 8/16/24 8:40 PM, Michalis Kamburelis via fpc-devel wrote:
If we could instead just put TVector3 in the published section, and
make it exposed in the object inspector (maybe adding some additional
code to use RTTI, but that is
On Fri, 16 Aug 2024, Michalis Kamburelis via fpc-devel wrote:
You cannot publish records, and this is not planned.
This is because things like
MyClass.MyRecord.MyField:=12;
do not work as one would naively expect. It does work if you use a TPersistent
instead of a record (the very reason t
On 8/16/24 8:40 PM, Michalis Kamburelis via fpc-devel wrote:
If we could instead just put TVector3 in the published section, and
make it exposed in the object inspector (maybe adding some additional
code to use RTTI, but that is made *once*, not every time we need to
expose TVector3) this would b
> You cannot publish records, and this is not planned.
>
> This is because things like
>
> MyClass.MyRecord.MyField:=12;
>
> do not work as one would naively expect. It does work if you use a TPersistent
> instead of a record (the very reason the TPersistent class was invented)
Do you mean the tra
On Thu, 15 Aug 2024, Mattias Gaertner via fpc-devel wrote:
Hi,
What is the state of published record in fpc trunk?
You cannot publish records, and this is not planned.
This is because things like
MyClass.MyRecord.MyField:=12;
do not work as one would naively expect. It does work if you
Hi,
What is the state of published record in fpc trunk?
The structures in typinfo.pp seems to be pretty complete, but fpc complains:
unit1.pas(42,24) Error: This kind of property cannot be published
{$mode delphi}
interface
uses Classes, TypInfo;
type
TMyRec = record
x,y: integer;
e
10 matches
Mail list logo