L
lfpsoft
Unregistered / Unconfirmed
GUEST, unregistred user!
TTCPClientEx = class(TIdTCPClient)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner: TComponent; overwride;
destructor Destroy;override;
....
destructor TTCPClientEx.Destroy ;
begin
inherited Destroy;
end;
constructor TTCPClientEx.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//在这里执行初始化操作
end;
应该是父类的声明不是虚函数,所以不能override。
但如果我想在自已的控件在Create时执行一些初始化操作,应该如何设计呢?
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(AOwner: TComponent; overwride;
destructor Destroy;override;
....
destructor TTCPClientEx.Destroy ;
begin
inherited Destroy;
end;
constructor TTCPClientEx.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//在这里执行初始化操作
end;
应该是父类的声明不是虚函数,所以不能override。
但如果我想在自已的控件在Create时执行一些初始化操作,应该如何设计呢?