我今天编译一个VCL控件源程序,其中"CollectionsEqual(Columns, TCustomDBGridExt(Filer.Ancestor).Columns))"编译通不过,好象是少了两个实参,但我不知道怎样添加.请高手指教.

解决方案 »

  1.   

    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中还需要两个参数是集合的所有者
      

  2.   

    哪位兄弟能帮我看这段代码吗?编译后提示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;
      

  3.   

    CollectionsEqual(Columns, TCustomDBGridExt(Filer.Ancestor).Columns),Columns的所有者,TCustomDBGridExt(Filer.Ancestor).Columns)的所有者)
    需要加两个参数
      

  4.   

    CollectionsEqual(Columns, TCustomDBGridExt(Filer.Ancestor).Columns),Columns的所有者,TCustomDBGridExt(Filer.Ancestor).Columns)的所有者)中的所有者怎么写?