这段程序什么问题 ( 积分: 200 )

  • 主题发起人 主题发起人 taiyangf
  • 开始时间 开始时间
T

taiyangf

Unregistered / Unconfirmed
GUEST, unregistred user!
type
TAddRPL = class(TWebPageModule)
AdapterPageProducer: TAdapterPageProducer;
AdapterForm1: TAdapterForm;
AdapterFieldGroup1: TAdapterFieldGroup;
FldContent: TAdapterDisplayField;
AdapterCommandGroup1: TAdapterCommandGroup;
CmdCancel: TAdapterActionButton;
CmdApply: TAdapterActionButton;
private
{ Private declarations }
public
{ Public declarations }
end;

function AddRPL: TAddRPL;

implementation

{$R *.dfm} {*.html}

uses WebReq, WebCntxt, WebFact, wdmDB;

function AddRPL: TAddRPL;
begin
Result := TAddRPL(WebContext.FindModuleClass(TAddRPL));
end;

initialization
if WebRequestHandler <> nil then
WebRequestHandler.AddWebModuleFactory(TWebPageModuleFactory.Create(TAddRPL, TWebPageInfo.Create([wpLoginRequired], '.html', '', '我的回复'), crOnDemand, caCache));

end.
为什么出现,type错误
 
type
TAddRPL = class(TWebPageModule)
AdapterPageProducer: TAdapterPageProducer;
AdapterForm1: TAdapterForm;
AdapterFieldGroup1: TAdapterFieldGroup;
FldContent: TAdapterDisplayField;
AdapterCommandGroup1: TAdapterCommandGroup;
CmdCancel: TAdapterActionButton;
CmdApply: TAdapterActionButton;
private
{ Private declarations }
public
{ Public declarations }
end;

function AddRPL: TAddRPL;

implementation

{$R *.dfm} {*.html}

uses WebReq, WebCntxt, WebFact, wdmDB;

function AddRPL: TAddRPL;
begin
Result := TAddRPL(WebContext.FindModuleClass(TAddRPL));
end;

initialization
if WebRequestHandler <> nil then
WebRequestHandler.AddWebModuleFactory(TWebPageModuleFactory.Create(TAddRPL, TWebPageInfo.Create([wpLoginRequired], '.html', '', '我的回复'), crOnDemand, caCache));

end.
为什么出现,type错误
 
检查一下参数吧
 
楼主把错误信息贴全,并告诉在哪里出错,这样容易帮忙解决问题
 
运行了一下,你少个单元没有引用,use variants,就ok 了
 
接受答案了.
 
后退
顶部