0
上未说明的标识符,我不知道为什么我得到德尔福这样的错误:声明的对象
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Xml.xmldom, Xml.XMLIntf,
XMLDoc;
type
TForm1 = class(TForm)
XMLDocument1: TXMLDocument;
ComboBox1: TComboBox;
Edit1: TEdit;
procedure ComboBox1Change(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure LeerXML();
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure LeerXML();
var
Query : IXMLNode;
begin
XMLDocument1.FileName := 'Query.xml'; <- RIGHT HERE SAYS "[dcc32 Error] Unit1.pas(36): E2003 Undeclared identifier: 'XMLDocument1'"
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
LeerXML();
end;
end.
,如果你发现任何错误代码,请告诉我,它已经有一段时间,因为我已经一直被困在互联网上。
我不知道是什么造成这是我第一次使用这个组件。
即将'procedure LeerXML();'变为'procedure TForm1.LeerXML();' –