R
Rain2002
Unregistered / Unconfirmed
GUEST, unregistred user!
怎样把一个类的事件指向一个非类的方法:
例:
Procedure mmClick(Sender:TObjec);
begin
end;
Procedure MyProcedure;
var
mm:TMenuItem
begin
//Create mm
mm.OnClick:=mmClick;
end;
出现:[Error] Unit1.pas(32): Incompatible types: method pointer and regular procedure
的错误。
例:
Procedure mmClick(Sender:TObjec);
begin
end;
Procedure MyProcedure;
var
mm:TMenuItem
begin
//Create mm
mm.OnClick:=mmClick;
end;
出现:[Error] Unit1.pas(32): Incompatible types: method pointer and regular procedure
的错误。