function CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean;DescriptionCall CollectionsEqual to determine whether two collections contain identical information. CollectionsEqual returns true if all the items in each collection have the same settings, and the items appear in the same order. CollectionsEqual returns false if the collections differ in number or order of items, or if any of the items in the collections differ.C1 and C2 are the collections to compare.Owner1 and Owner2 are the Owners of the collections. Owner1 and Owner2 must be "root"components, such as forms or data modules. They are used for resolving name references in the properties of the collections. 这个vcl是for d7以下版本的吧,d7中还需要两个参数是集合的所有者
哪位兄弟能帮我看这段代码吗?编译后提示CollectionsEqual没有足够的的实参,请问如何加这两个实参? procedure TCustomDBGridExt.DefineProperties(Filer: TFiler); begin Filer.DefineProperty('Columns', ReadColumns, WriteColumns, ((Columns.State = csCustomized) and (Filer.Ancestor = nil)) or ((Filer.Ancestor <> nil) and ((Columns.State <> TCustomDBGridExt(Filer.Ancestor).Columns.State) or (not CollectionsEqual(Columns, TCustomDBGridExt(Filer.Ancestor).Columns))))) end;
这个vcl是for d7以下版本的吧,d7中还需要两个参数是集合的所有者
procedure TCustomDBGridExt.DefineProperties(Filer: TFiler);
begin
Filer.DefineProperty('Columns', ReadColumns, WriteColumns,
((Columns.State = csCustomized) and (Filer.Ancestor = nil)) or
((Filer.Ancestor <> nil) and
((Columns.State <> TCustomDBGridExt(Filer.Ancestor).Columns.State)
or (not CollectionsEqual(Columns, TCustomDBGridExt(Filer.Ancestor).Columns)))))
end;
需要加两个参数