TDMIBFrameHandle = class(TFrame)
protected
FOPETreeView: TMIBTreeView;
function CheckEditers: Boolean; virtual; abstract;
procedure ClearAddEditCheck; virtual; abstract;
procedure ClearEditer; virtual; abstract;
procedure DisableEditers; virtual; abstract;
procedure DisableGrid; virtual; abstract;
procedure EnabledEditers; virtual; abstract;
procedure EnableGrid; virtual; abstract;
function GetColumnValue(const aFieldName: string): Variant; virtual;
abstract;
procedure GetEditerValues; virtual; abstract;
procedure InitializeEditer; virtual; abstract;
procedure InitializeToolBar; virtual; abstract;
procedure StartSelect; virtual; abstract;
public
procedure Close; virtual;
procedure StartSurf; virtual;
end;
TDMIBFrame = class(TDMIBFrameHandle)
end;
protected
FOPETreeView: TMIBTreeView;
function CheckEditers: Boolean; virtual; abstract;
procedure ClearAddEditCheck; virtual; abstract;
procedure ClearEditer; virtual; abstract;
procedure DisableEditers; virtual; abstract;
procedure DisableGrid; virtual; abstract;
procedure EnabledEditers; virtual; abstract;
procedure EnableGrid; virtual; abstract;
function GetColumnValue(const aFieldName: string): Variant; virtual;
abstract;
procedure GetEditerValues; virtual; abstract;
procedure InitializeEditer; virtual; abstract;
procedure InitializeToolBar; virtual; abstract;
procedure StartSelect; virtual; abstract;
public
procedure Close; virtual;
procedure StartSurf; virtual;
end;
TDMIBFrame = class(TDMIBFrameHandle)
end;
光看这代码我想应该没有什么问题,但问题就出在这代码上。因为这个代码是建立纯PAS文件,也就是说不带窗口的PAS。因为OldCreateOrder 是Form才有属性,那么如果以这个类来继承它会自动加上Form中的属性(因为基类没有窗口,而继承类中有窗口,Delphi自动加上了Form的属性)。那么解决方法很简单,创建一个带窗口的Frame基类,再从这个基类继承即可。不知道是不是单间D7的问题(感觉是个BUG),2007不知道有没有这个问题。