如何在 RemObject 中注册索引 属性?

How to register indexed property in RemObject?

我想注册 属性 个 TString 的字符串 class。当我注册一个简单的 属性 时,我写:

ACompiler.FindClass(ClassName).RegisterProperty(PropertyName,PropertyTypeName, PSPropType);

在 OnCompImport 事件中

ARuntimeImporter.FindClass(ClassName).RegisterPropertyHelper(GetterCodeAddress, SetterCodeAddress, PropertyName);

在 OnExecImport 事件中。 但是我没有找到任何 RegisterIndexedProperty 和 RegisterIndexedPropertyHelper 方法。

需要在属性类型参数中写入:属性类型、索引类型1、索引类型2等。例如:

    ACompiler.FindClass('TStringList').RegisterProperty('Strings',' String Integer',iptRW);

并且在实现方法中Value of a 属性类型必须在第一位。例如:

procedure GetStringsMethod(Self: TObject; var AValue: string; AIndex: Integer);

procedure SetStringsMethod(Self: TObject; const AValue: string; AIndex: Integer);