流
流水先生
Unregistered / Unconfirmed
GUEST, unregistred user!
Taaa= class(TPersistent)
private
Fjj: string;
Fhh: TOurCollection;
FOwner: TComponent;
procedure Sethh(const Value: TOurCollection);
public
constructor Create(AOwner: TComponent);
published
property jj:string read Fjj write Fjj;
property hh:TOurCollection read Fhh write Sethh;//属性编辑时不能弹出编辑框
end;
Tbbb= class(TComponent)
private
Fitem: TOurCollection;
Faa:Taaa;
procedure Setitem(const Value: TOurCollection);
procedure Setaa(const Value: Taaa);
public
constructor Create(AOwner: TComponent); override;
published
property items:TOurCollection read Fitem write SetItem; //属性编辑时能弹出编辑框
property aa:Taaa read Faa write Setaa;
end;
procedure Taaa.Sethh(const Value: TOurCollection);
begin
Fhh.Assign(Value);
end;
constructor Taaa.Create(AOwner: TComponent);
begin
inherited create;
Fhh := TOurCollection.Create(AOwner);
FOwner := AOwner;
end;
procedure Tbbb.Setaa(const Value: TOurCollection);
begin
Faa.Assign(Value);
end;
constructor Tbbb.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Faa := taaa.create
Fitem:=TOurCollection.Create(Self);
end;
procedure Tbbb.Setitem(const Value: TOurCollection);
begin
Fitem.Assign(Value);
end;
procedure Tbbb.Setitem(const Value: Taaa);
begin
Faa.Assign(Value);
end;
以上是我的代码。问题出在注释的那两行,我经验不够还不知道是哪里的问题,还望各位指点。
private
Fjj: string;
Fhh: TOurCollection;
FOwner: TComponent;
procedure Sethh(const Value: TOurCollection);
public
constructor Create(AOwner: TComponent);
published
property jj:string read Fjj write Fjj;
property hh:TOurCollection read Fhh write Sethh;//属性编辑时不能弹出编辑框
end;
Tbbb= class(TComponent)
private
Fitem: TOurCollection;
Faa:Taaa;
procedure Setitem(const Value: TOurCollection);
procedure Setaa(const Value: Taaa);
public
constructor Create(AOwner: TComponent); override;
published
property items:TOurCollection read Fitem write SetItem; //属性编辑时能弹出编辑框
property aa:Taaa read Faa write Setaa;
end;
procedure Taaa.Sethh(const Value: TOurCollection);
begin
Fhh.Assign(Value);
end;
constructor Taaa.Create(AOwner: TComponent);
begin
inherited create;
Fhh := TOurCollection.Create(AOwner);
FOwner := AOwner;
end;
procedure Tbbb.Setaa(const Value: TOurCollection);
begin
Faa.Assign(Value);
end;
constructor Tbbb.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Faa := taaa.create
Fitem:=TOurCollection.Create(Self);
end;
procedure Tbbb.Setitem(const Value: TOurCollection);
begin
Fitem.Assign(Value);
end;
procedure Tbbb.Setitem(const Value: Taaa);
begin
Faa.Assign(Value);
end;
以上是我的代码。问题出在注释的那两行,我经验不够还不知道是哪里的问题,还望各位指点。