请教以下我的代码哪里错了?就是编译不成功-100分啊!(100分)

  • 主题发起人 主题发起人 zjycpic
  • 开始时间 开始时间
Z

zjycpic

Unregistered / Unconfirmed
GUEST, unregistred user!
我正在用intraweb5.53编写一个web访问数据库的程序可是,不知道以下代码哪里错了!
提示错误:[Error] menu.pas(54): Undeclared identifier: 'RWebApplication'
[Error] menu.pas(54): ')' expected but identifier 'ActiveForm' found
[Fatal Error] IWUnit1.pas(7): Could not compile used unit 'menu.pas'
另外一用“TIWDBAdvWebGrid”控件还提示:[Error] File not found: 'tmsiwgrid.res'


代码如下:
unit menu;

interface

uses
Windows, Messages,IWTypes, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, IWControl, IWCompMenu, IWExtCtrls, IWCompLabel,IWAppForm,IWhtmlcontrols,
IWTMSCtrls,IWApplication,Variants ;

type
TFrame1 = class(TFrame)
IWMenu1: TIWMenu;
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
N11: TMenuItem;
N9: TMenuItem;
N12: TMenuItem;
N10: TMenuItem;
N13: TMenuItem;
IWImage1: TIWImage;
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N11Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N13Click(Sender: TObject);
private
procedure Move(AFormClass: TIWAppFormClass);
{ Private declarations }
public

{ Public declarations }
end;

implementation
uses IWunit1,chart;
{$R *.dfm}
procedure TFrame1.Move (AFormClass:TIWAppFormClass);
begin
TIWAppForm(RWebApplication.ActiveForm).Release;
AFormClassCreate(RWebApplication).Show;
end;
procedure TFrame1.N2Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N3Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N4Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N5Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N6Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N7Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N8Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N9Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N10Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N11Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N12Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N13Click (Sender: TObject);
begin
Move(tformmain1);
end;
procedure TFrame1.N1Click (Sender: TObject);
begin
Move(tformmain1);
end;
end.
 
把程序中的“RWebApplication”改为“Application”试一下
 
1.RWebApplication在哪里定义的?
2.RWebApplication是否有这个 ActiveForm属性?
3.查找“TIWDBAdvWebGrid”的资源文件再哪里,然后再把他引进来!
 
RWebApplication不用定义书上例子是说它和WebApplication一样不用定义。
另外我也按两位说的设置了,不行。我想以上设置是正确的,如果我把这两条语句删除,会提示更多的错误,
 
查找包含“RWebApplication”的*.pas文件,
一般在delphi的安装目录下找,然后把此单元引用就可以了
 
你的单元中应该包括 webbroker
就是在uses中加上WebBroker,
你这可能用了一控件,可能你忘了加上或者删掉了,看看是不是有个叫TWebapplication的
控件。或者TRWebApplication控件。
 
To reference RWebApplication you will need to [red]add IWInit to your uses clause[/red].
 
多人接受答案了。
 
后退
顶部