published
peocedure methodName index ??; //这里的索引号怎么定义
property Left: Longint index 0 read GetCoordinate write SetCoordinate;
property Top: Longint index 1 read GetCoordinate write SetCoordinate;
property Right: Longint index 2 read GetCoordinate write SetCoordinate;
property Bottom: Longint index 3 read GetCoordinate write SetCoordinate;
peocedure methodName index ??; //这里的索引号怎么定义
property Left: Longint index 0 read GetCoordinate write SetCoordinate;
property Top: Longint index 1 read GetCoordinate write SetCoordinate;
property Right: Longint index 2 read GetCoordinate write SetCoordinate;
property Bottom: Longint index 3 read GetCoordinate write SetCoordinate;
你还是先了解一下rtti都能干嘛吧,不要想当然
PPropInfo = ^TPropInfo;
TPropInfo = packed record
PropType: PPTypeInfo;
GetProc: Pointer;
SetProc: Pointer;
StoredProc: Pointer;
Index: Integer;
Default: Longint;
NameIndex: SmallInt;
Name: ShortString;
end;
index又不是专门给rtti用的,只不过rtti中需要提供它的信息而已
index又不是专门给rtti用的,只不过rtti中需要提供它的信息而已
=======================================================
其实我并不是想通过index 得到property, 而是想自己定义一些值给他, 然后取出这些值做其它使用。
看了一下RTTI 取出这些索引值好像直支持 property 定义的, 如果支持 procedure 或则 function
就好了
这是属性的
方法定义索引?
这不肯能吧?
不知道楼主的意义为何,这样做。