我项目中各窗体结构如下:
base_Form
|
childform1 childform2
| |
childform11 childform12 childform21
base_form中重载了Create构造函数。 如下:
constructor Create(aowner: Tcomponent; aformmode: tformmode); reintroduce; overload;
begin
Inherited Create(Aowner);
if ......then .... else...
end;之前我实现了childform11, childform12, 其它窗口通过Tchildform11.create(self,fmindert) 创建childform11, childform12 ,运行没问题;但调用childform21.create(self,fminsert) 时,程序运行到base_form的 Inherited Create(Aowner) 语句时出错。。弹出EListError 'list out of bounds(-1)' 错误。 我在想: 执行 inherited create(Aowner) 后,流程已流入vcl控制,并没执行我自已写的语句就出错。 ,但为什么childform11,childform12又不出错呢
搞不懂。。只有请大家帮忙了 希望大家可以给点意见。 分不多了,请见谅
base_Form
|
childform1 childform2
| |
childform11 childform12 childform21
base_form中重载了Create构造函数。 如下:
constructor Create(aowner: Tcomponent; aformmode: tformmode); reintroduce; overload;
begin
Inherited Create(Aowner);
if ......then .... else...
end;之前我实现了childform11, childform12, 其它窗口通过Tchildform11.create(self,fmindert) 创建childform11, childform12 ,运行没问题;但调用childform21.create(self,fminsert) 时,程序运行到base_form的 Inherited Create(Aowner) 语句时出错。。弹出EListError 'list out of bounds(-1)' 错误。 我在想: 执行 inherited create(Aowner) 后,流程已流入vcl控制,并没执行我自已写的语句就出错。 ,但为什么childform11,childform12又不出错呢
搞不懂。。只有请大家帮忙了 希望大家可以给点意见。 分不多了,请见谅
先谢各位了