4
votes

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."

1
$METHODINFO only applies to methods, not properties. - dthorpe
@dthorpe thanks for the hint - I removed the side note about the non working public properties - mjn
$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

1 Answers

3
votes

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

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