套
套牢1
Unregistered / Unconfirmed
GUEST, unregistred user!
unit unit1;
interface
uses
Windows…
type
TMyForm = class;
TMyComponent = class(TComponent)
private
FMyForm : TMyForm;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
….
published
….//公有属性
end;
TMyForm = class(TForm)
protected
MyComponent1: TMyComponent;
…..
end;
我总是感觉TMyComponent和TMyForm 有点循环定义的嫌疑,谁能解释他们之间的关系
interface
uses
Windows…
type
TMyForm = class;
TMyComponent = class(TComponent)
private
FMyForm : TMyForm;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
….
published
….//公有属性
end;
TMyForm = class(TForm)
protected
MyComponent1: TMyComponent;
…..
end;
我总是感觉TMyComponent和TMyForm 有点循环定义的嫌疑,谁能解释他们之间的关系