为什么老出现undeclared identifier "splineTable" ?
小弟编了一个程序,在unit18(name:SplineTable)中加了DBGrid,table,DataSource等组件,在unit20里面调用了unit18.可是一编译,软件老是提示:undeclared identifier "splineTable"。当时无奈之下,我把unit18删了,然后重新建立一个Form,之后不再有这个错误提示,可是今天突然又出现了。请各位强人帮我看看到底是怎么回事。谢谢!程序附下: unit Unit20;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, DB, DBTables, TeEngine, Series,ExtCtrls,
TeeProcs, Chart, DbChart;
type
Tsplineposerrchart = class(TForm)
DBChart1: TDBChart;
Series1: TFastLineSeries;
Table1: TTable;
DataSource1: TDataSource;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
DBGrid1: TDBGrid;
Label3: TLabel;
DataSource2: TDataSource;
Table2: TTable;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
SaveDialog1: TSaveDialog;
GroupBox2: TGroupBox;
Label4: TLabel;
Label5: TLabel;
Edit3: TEdit;
Edit4: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
splineposerrchart: Tsplineposerrchart;
implementation
uses Unit18, Unit19;
{$R *.dfm}
procedure Tsplineposerrchart.Button1Click(Sender: TObject);
begin
splineposchart.show;
end;
procedure Tsplineposerrchart.Button2Click(Sender: TObject);
begin
splinetable.show;
end;
procedure Tsplineposerrchart.Button3Click(Sender: TObject);
begin
if savedialog1.Execute then
dbchart1.SaveToBitmapFile('d:\002.bmp')
end;
procedure Tsplineposerrchart.Button4Click(Sender: TObject);
begin
table1.Active:=false;
table1.TableName:='';
table2.Active:=false;
splineposerrchart.Close;
end;
procedure Tsplineposerrchart.FormShow(Sender: TObject);
begin
table1.Active:=false;
table1.TableName:=splinetable.table1.TableName;
table1.Active:=true;
edit2.Text:= splinetable.edit2.Text;
table2.active:=true;
end;
end.