4

By default, RTTI in versions below 2010 is only created for published class members.

I have read in a 2006 blog (http://hallvards.blogspot.com/2006/09/extended-class-rtti.html) that using $METHODINFO (or $M), public and published methods are included since Delphi 6. Is this correct?

The blog entry said:

"For WebSnap, the “new” $METHODINFO ON compiler directive (which was undocumented in D6 and D7) is used to generate extended RTTI for public and published methods." ... "Updated (27. Oct 2007): $METHODINFO was first available in Delphi 7, not Delphi 6."

wattostudios
  • 8,666
  • 13
  • 43
  • 57
mjn
  • 36,362
  • 28
  • 176
  • 378
  • 3
    $METHODINFO only applies to methods, not properties. – dthorpe Dec 01 '10 at 18:29
  • @dthorpe thanks for the hint - I removed the side note about the non working public properties – mjn Dec 01 '10 at 18:35
  • 2
    $METHODINFO was added to the compiler to support interface remoting - dynamic stub + proxy generation by the RTL used with Corba objects, I think. I don't remember which version of the product that first appeared in. – dthorpe Dec 01 '10 at 19:13

1 Answers1

3

The new RTTI in Delphi 2010 and up supports what you want.

You're out of luck in Delphi 2009 and below.

Alexander
  • 23,432
  • 11
  • 63
  • 73
Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
  • So does Delphi 7 (at least). Delphi 2010 supports a whole bunch more stuff. In fact, doesn't just "support" but throws it in and requires you to turn it off if you don't want it, which you probably don't if you were managing to get by without it before - ;). – Deltics Dec 01 '10 at 19:44
  • @mjustin: no problem; just stating the facts so others may benefit from it too. – Jeroen Wiert Pluimers Dec 01 '10 at 22:02