In Delphi 2007, I added a new line type to the project:
type
String40 = string;
This property is used in the class:
type
TPerson = class
private
FFirstName = String40;
published
FirstName: string40 read FFirstName write FFirstName;
end;
At run time, I want to get the FirstName property name using RTTI. I expect this to be String40:
var
MyPropInfo: TPropInfo;
PropTypeName: string;
MyPerson: TPerson;
begin
MyPerson := TPerson.Create;
MyPropInfo := GetPropInfo(MyPerson, 'FirstName')^;
PropTypeName := MyPropInfo.PropType^.Name;
However, in this example, PropTypeName is "string". What do I need to do to get the correct property type name, "String40"?
source
share