我想注册属性字符串的TStrings类。当我注册一个简单的属性时,我写道:
2016-08-18 23:19:00,462 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl (Container Monitor): Memory usage of ProcessTree 7031 for container-id container_: 53.6 GB of 52 GB physical memory used; 104.4 GB of 260 GB virtual memory used
2016-08-18 23:19:03,480 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl (Container Monitor): Memory usage of ProcessTree 7031 for container-id container_: 53.9 GB of 52 GB physical memory used; 104.4 GB of 260 GB virtual memory used
2016-08-18 23:19:06,498 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl (Container Monitor): Memory usage of ProcessTree 7031 for container-id container_: 53.9 GB of 52 GB physical memory used; 104.4 GB of 260 GB virtual memory used
2016-08-18 23:19:09,516 INFO org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor.ContainersMonitorImpl (Container Monitor): Memory usage of ProcessTree 7031 for container-id container_: 53.8 GB of 52 GB physical memory used; 104.4 GB of 260 GB virtual memory used
OnCompImport事件中的
和
ACompiler.FindClass(ClassName).RegisterProperty(PropertyName,PropertyTypeName, PSPropType);
在OnExecImport事件中。 但我还没有找到任何RegisterIndexedProperty和RegisterIndexedPropertyHelper方法。
答案 0 :(得分:0)
需要在属性类型参数中写入:属性类型,索引类型1,索引类型2等。例如:
ACompiler.FindClass('TStringList').RegisterProperty('Strings',' String Integer',iptRW);
在实现方法中,属性类型的值必须位于第一位。例如:
procedure GetStringsMethod(Self: TObject; var AValue: string; AIndex: Integer);
procedure SetStringsMethod(Self: TObject; const AValue: string; AIndex: Integer);