TMyOncreate = procedure(sender: TObject);private FMyOncreate:TMyOncreate; published property MyOncreate:TMyOncreate read FMyOncreate write FMyoncreate;procedure Tmyclass.Oncreate(sender: Tobjece); begin If assigned(FMyoncreate) then FMyoncreate(sender); end;结贴吧!!!!!!!!
var FOnCreate:TNotifyEvent protected procedure DoOnCreate;dynamic; publised property OnCreate:TNotifyEvent read FOnCreate write FOnCreate; ... procedure DoOnCreate;dynamic; begin if assignes(FOnCreate) then FOnCreate(self); end;
加入以上代码后出现巨多错误,请大家看看。哎,我现在被卡在这动也不能动了。 错误如下: Field definition not allowed after methods or properties Published property 'MyOnCreate' cannot be of type PROCEDURE Undeclared idextifier:'OnCreate' Undeclared identifier:'FMyOnCreate' Incompatible types
http://expert.csdn.net/Expert/topic/1723/1723430.xml?temp=.3397791
提示基类中没有该方法。
procedure SetParent(AParent: TWinControl); override;有什么作用?
具体应该如何应用?
FMyOncreate:TMyOncreate;
published
property MyOncreate:TMyOncreate read FMyOncreate write FMyoncreate;procedure Tmyclass.Oncreate(sender: Tobjece);
begin
If assigned(FMyoncreate) then FMyoncreate(sender);
end;结贴吧!!!!!!!!
FOnCreate:TNotifyEvent
protected
procedure DoOnCreate;dynamic;
publised
property OnCreate:TNotifyEvent read FOnCreate write FOnCreate;
...
procedure DoOnCreate;dynamic;
begin
if assignes(FOnCreate) then FOnCreate(self);
end;
错误如下: Field definition not allowed after methods or properties
Published property 'MyOnCreate' cannot be of type PROCEDURE
Undeclared idextifier:'OnCreate'
Undeclared identifier:'FMyOnCreate'
Incompatible types
http://expert.csdn.net/Expert/topic/1728/1728080.xml?temp=.3493463楼上的错误是huojiehai(海天子) 朋友帖出的程序运行时发生的错误。
hkbarton(我是好人) 的我再来测试。