i]);
end;
finally
NameStrings.Free;
end;
end;
procedure TFieldNameProperty.GetValues(Proc: TGetStrProc);
var
NameStrings: TStrings;
i: Integer;
TempTable: TTable;
begin
NameStrings := TStringList.Create;
TempTable := TTable.Create(GetComponent(0) as TNWDictTreeView);
try
TempTable.DatabaseName := (GetComponent(0) as TNWDictTreeView).DatabaseName;
if (GetName = ''DictRelationParentCodeFieldName'') or
(GetName = ''DictRelationCodeFieldName'') then
TempTable.TableName := (GetComponent(0) as TNWDictTreeView).DictRelationTableName
else
TempTable.TableName := (GetComponent(0) as TNWDictTreeView).DictTableName;
TempTable.GetFieldNames(NameStrings);
for i := 0 to NameStrings.Count - 1 do
begin
Proc(NameStrings[i]);
end;
finally
TempTable.Free;
NameStrings.Free;
end;
end;
end.
当然,也有一些没这么容易,如 TCollectionEditor, TDesignWindow 等,原来的虚拟方法都变了。你可以试试升级 EhLib。