我单步跟踪程序到了如下语句:
Train_Form.SetDisplayStatus('文档特征统计...',iTrainFileCount,0,'',0,0);
程序进入SetDisplayStatus过程
procedure TTrain_Form.SetDisplayStatus(stTr1:string; iInt1,iInt2:Integer; stTr2:string; iInt3,iInt4:Integer);
begin
stTrainCurrentProc := stTr1;
iTrainFileCount := iInt1;
iTrainProFileCount := iInt2;
stCurrentProFile := stTr2;
iTGB_ProgBar1 := iInt3;
iTGB_ProgBar2 := iInt4;
Train_Form.DisplayStatus;
end;
然后进入Train_Form.DisplayStatus;
procedure TTrain_Form.DisplayStatus;
begin 程序跟踪到这里就不能执行了是什么原因?
TGB_Label7.Caption := stTrainCurrentProc; //当前事务
TGB_Label8.Caption := IntToStr(iTrainFileCount); //文件总数
TGB_Label9.Caption := IntToStr(iTrainProFileCount); //已处理文件数
TGB_Label10.Caption := stCurrentProFile; //当前处理文件
TGB_ProgBar1.Position := iTGB_ProgBar1;
TGB_ProgBar2.Position := iTGB_ProgBar2;
end;问题就是:程序在DisplayStatus过程的begin处就再也不动了,为什么?请高手帮忙
Train_Form.SetDisplayStatus('文档特征统计...',iTrainFileCount,0,'',0,0);
程序进入SetDisplayStatus过程
procedure TTrain_Form.SetDisplayStatus(stTr1:string; iInt1,iInt2:Integer; stTr2:string; iInt3,iInt4:Integer);
begin
stTrainCurrentProc := stTr1;
iTrainFileCount := iInt1;
iTrainProFileCount := iInt2;
stCurrentProFile := stTr2;
iTGB_ProgBar1 := iInt3;
iTGB_ProgBar2 := iInt4;
Train_Form.DisplayStatus;
end;
然后进入Train_Form.DisplayStatus;
procedure TTrain_Form.DisplayStatus;
begin 程序跟踪到这里就不能执行了是什么原因?
TGB_Label7.Caption := stTrainCurrentProc; //当前事务
TGB_Label8.Caption := IntToStr(iTrainFileCount); //文件总数
TGB_Label9.Caption := IntToStr(iTrainProFileCount); //已处理文件数
TGB_Label10.Caption := stCurrentProFile; //当前处理文件
TGB_ProgBar1.Position := iTGB_ProgBar1;
TGB_ProgBar2.Position := iTGB_ProgBar2;
end;问题就是:程序在DisplayStatus过程的begin处就再也不动了,为什么?请高手帮忙
在TGB_Label7.Caption := stTrainCurrentProc; 这里设置短点
其实这个过程就是把界面上的东西重置一下!
去掉了,也是一样的,没有变化
比如你声明的变量类型、你使用SetDisplayStatus前的其它操作等。