Recent

Author Topic: Question on method and rtti  (Read 2462 times)

ti_dic

  • New member
  • *
  • Posts: 8
Question on method and rtti
« on: January 14, 2015, 11:15:37 pm »
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.     
« Last Edit: January 14, 2015, 11:24:33 pm by ti_dic »

 

TinyPortal © 2005-2018