…… …… procedure TMainForm.Button2Click(Sender: TObject); //在这里用到了这个类,并将其实例化 begin if OpenDialog1.Execute then begin wordAnalyze:=TWordAnalyze.Create; wordAnalyze.fileDir:=OpenDialog1.FileName; if wordAnalyze.connect(wordAnalyze.fileDir) then wordAnalyze.scanner; end; end;
end.
编译时提示错误:Field MainForm.wordAnalyze does not have a corresponding component. Remove the declaration? 我觉得这可能是在类定义和使用中缺了什么东西,可是我翻遍全书还是找不到答案(因为书中的例子都是在本单元内对定义的类进行实例化的)。实在没有办法才来麻烦大家给看一看问题究竟处在哪儿? 请各位高手不吝赐教,这个问题对我很重要。谢谢!
----------------------------------------------
学习中……