彭
彭真
Unregistered / Unconfirmed
GUEST, unregistred user!
麻烦各位大哥帮我看看
怎么老是显示错误.我用其他的maptoolused 的时候都不会这样,新建图层就会??
procedure TMain_form.Open1Click(Sender: TObject);
var EditLayer : Variant;
path, fileName : String;
empty: Variant;
begin
path := edit2.Text;
fileName := edit1.Text+'.tab';
Main_form.Map1.Layers.CreateLayer(fileName,path + '/' + fileName, 1,
emptyparam, emptyparam);
showmessage('file has been created');
main_form.combobox1.Items.Add(newlayer_form.Edit1.Text);
main_form.ComboBox1.ItemIndex:=0;
if main_form.combobox1.text<>'' then
EditLayer:=main_form.Map1.ControlInterface.Layers.
Item(main_form.Combobox1.Text);
end;
为什么总是提示错误:'未找到使用指定索引的对象'
然后显示我Editlayer赋值语句错误
(既EditLayer:=main_form.Map1.ControlInterface.Layers.Item
(main_form.Combobox1.Text);出错)
麻烦各位大哥帮我看看
怎么老是显示错误.我用其他的maptoolused 的时候都不会这样,新建图层就会??
procedure TMain_form.Open1Click(Sender: TObject);
var EditLayer : Variant;
path, fileName : String;
empty: Variant;
begin
path := edit2.Text;
fileName := edit1.Text+'.tab';
Main_form.Map1.Layers.CreateLayer(fileName,path + '/' + fileName, 1,
emptyparam, emptyparam);
showmessage('file has been created');
main_form.combobox1.Items.Add(newlayer_form.Edit1.Text);
main_form.ComboBox1.ItemIndex:=0;
if main_form.combobox1.text<>'' then
EditLayer:=main_form.Map1.ControlInterface.Layers.
Item(main_form.Combobox1.Text);
end;
为什么总是提示错误:'未找到使用指定索引的对象'
然后显示我Editlayer赋值语句错误
(既EditLayer:=main_form.Map1.ControlInterface.Layers.Item
(main_form.Combobox1.Text);出错)
麻烦各位大哥帮我看看