[fpc-devel] property cam access private symbol from class in other unit

Martin lazarus at mfriebe.de
Wed Jan 4 18:13:50 CET 2012


Only tested with 2.4.4; so if changed in 2.6 ....

in unit2

   TFoo = class(TObject)
   private
     FBar: integer;
   public
     property Bar: integer read FBar write FBar;
   end;

which means in unit1, it is not allowed to access
   TFoo.FBar


But it can be done:
     property Num: Integer read FFoo.FBar;

see attached....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: privprop.rar
Type: application/octet-stream
Size: 1174 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120104/8e47f854/attachment.obj>


More information about the fpc-devel mailing list