> On Jun 14, 2018, at 4:44 PM, Ryan Joseph <r...@thealchemistguild.com> wrote: > > Something I tried was using properties like this but it didn’t work. Is that > something properties could do? It feels like they should be able to reach > into records fields that since everything is known to the property as time of > declaration. > > property Position: TVec2D read entity^.position;
I just did a test and found out property does indeed access record fields (that’s great to know) but when I made it a pointer that’s when it broke. Why not make properties do this? type TEntity = record position: TVec2; end; TEntityPtr = ^TEntity; type TDoor = record entity: TEntityPtr; state: boolean; property position: TVec2 read entity^.position; end; Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal