<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="monospace">Hi,<br>
      <br>
      What does it take for a class to access a field using
      FieldAddress(...)?<br>
      <br>
      I have tried with both typeinfo on/off ({M+}), placing the field
      in private/protected/public/published<br>
      sections but to no avail.<br>
      <br>
      My simple code is:<br>
      <br>
      TMyObject = class<br>
      private <br>
        FRef: TMyObject;<br>
        procedure SetRef(AValue: TMyObject);<br>
      public<br>
        property Ref: TMyObject read FRef write SetRef;<br>
      end;<br>
      <br>
      <br>
      then i have tried to get the adress in two ways:<br>
      <br>
      AMyObject.FieldAddress('FRef');   //returns nil</font><br>
    <font face="monospace"><font face="monospace">AMyObject.FieldAddress('Ref');   
        //also returns nil</font><br>
      <br>
      If i run my code through debugger, the VMT FieldTable is empty
      suggesting no information is<br>
      created. This happens in all cases of typeinfo on/off and
      differenc sections...<br>
      <br>
      What can i do to make the fieldadress accessible?<br>
      <br>
      Regards,<br>
      Torsten.<br>
    </font>
  </body>
</html>