delphi 使用TThreadList的remove方法时提示此错误:list index out of bounds (63);
 提示意思是索引越界问题,TThreadList是delphi提供的类,remove是其方法,使用它怎么会出现此问题?
 望高手指点啊

解决方案 »

  1.   

    你先看看TThreadList里是否有63这个索引的数据呢?
      

  2.   

                if ((client.Name=client1.Name) and (not (client.Socket=client1.Socket))) then
                begin
                  if sockettemp=-1 then
                  begin
                    sockettemp:=TSimpleClient(Items[i]).Socket;  //clc-11-24
                  end;
                  Remove(client1);
                end;能够执行到Remove,应该是有此索引的数据吧.....
      

  3.   


     if ((client.Name=client1.Name) and (not (client.Socket=client1.Socket))) then
      begin
      if sockettemp=-1 then
      begin
      sockettemp:=TSimpleClient(Items[i]).Socket; //clc-11-24
      end;
      Remove(client1);
      end;能够执行到Remove,应该是有此索引的数据吧.....