function TDataMod.GetClassProperties(AClass: TClass):TStrings; var PropCount, I: SmallInt; PropList: PPropList; PropStr: string; begin result := TStringList.Create; PropCount := GetTypeData(AClass.ClassInfo).PropCount; GetPropList(AClass.ClassInfo, PropList); for I := 0 to PropCount - 1 do begin case PropList[I]^.PropType^.Kind of tkClass : PropStr := '[Class] '; tkMethod : PropStr := '[Method]'; tkSet : PropStr := '[Set] '; tkEnumeration: PropStr := '[Enum] '; else PropStr := '[Field] '; result.Add(PropList[I]^.Name); end; end; FreeMem(PropList); end; |
SetPropValue(obj, fieldName, fieldValue); |