Forum > General

Question on method and rtti

(1/1)

ti_dic:
hi,
is it normal that the name of the method is never populated in the PTypeInfo returned by TypeInfo()?


program project1;
uses typinfo,classes;

Type

 MyClass = Class(TPersistent)
      published
        procedure PubMeth(Param1 :string);
     End;

Procedure DoPrint(tmp : shortString);
Begin
  WriteLn(tmp);
End;

procedure MyClass.PubMeth(Param1: string);
begin
end;

var inf : PTypeInfo;

begin
  inf:=TypeInfo(@DoPrint);
  DoPrint(inf^.Name);
  inf:=TypeInfo(@MyClass.PubMeth);
  DoPrint(inf^.Name);
end.     

Navigation

[0] Message Index

Go to full version