X
xxhadsg
Unregistered / Unconfirmed
GUEST, unregistred user!
我开发一个控件:
TMyObj = class(TComponent)
private
FMyCom: TComm;
public
procedure ProcCommReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
...
然后在构造函数中
inherited create(AOwner);
FMyCom:=TComm.create(self);
//将TComm的事件重指向
FMyCom.OnReceiveData:=ProcCommReceiveData;
为什么事件不能引发?
如果从tcomm派生一个新类,事件怎么样重指向?
谢谢指教。
TMyObj = class(TComponent)
private
FMyCom: TComm;
public
procedure ProcCommReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
...
然后在构造函数中
inherited create(AOwner);
FMyCom:=TComm.create(self);
//将TComm的事件重指向
FMyCom.OnReceiveData:=ProcCommReceiveData;
为什么事件不能引发?
如果从tcomm派生一个新类,事件怎么样重指向?
谢谢指教。