Page 1 of 1

Designtime,listindex out of bounds(-1)

Posted: Mon Dec 18, 2006 6:52 am
by 9348276
version 7.07

1.add a "color grid"
2.Change to "Data" Page,write someting in "Text" column
3.Change to "Series" Page,and "DataSource" Page
4.Get the error

Posted: Mon Dec 18, 2006 10:10 am
by yeray
Hello mustapha.wang,
Following the steps you've posted we couldn't reproduce the error you get.
Maybe you skipped to let us know an essential step that causes the problem or maybe your IDE is not referencing v7.07 packages properly. You can check this right-clicking on the chart and selecting the "about" option.

Best greetings,
Yeray Alonso,
Steema Software.

Posted: Tue Dec 19, 2006 2:38 am
by 9348276
My IDE is delphi7+Update1
I confirmed I am useing teechart 7.07.

2.Change to "Data" Page,write something under "Text" column,such as

# Text X Y Z
0 AAA

and the error may raise many times.

Posted: Tue Dec 19, 2006 9:47 am
by yeray
Hello mustapha.wang,
I installed the update 1 for delphi 7 to see if it causes your problem and it works fine on my computer.
Can you check that v7.07 of TeeChart packages are selected at Project\Options\Packages and its Lib and Bin paths are at the TOP of the Search Path list in Project\Options\Directories/Conditionals, please?

Posted: Wed Dec 20, 2006 4:07 am
by 9348276
Generally,I always delete Tee*.* under delphi\lib,
and I am sure to compiled and used 7.07 source.

I am not sure this posted code if forbided by you.If so,sorry and please delete as soon as possible.

Code: Select all

Function TCustomChartGrid.GetSeries(ACol:Integer; Var AList:TChartValueList):TChartSeries;

  procedure GetAList(Index:Integer);
  begin
    if IHasNo[Index] then
       AList:=result.ValuesList[ACol-1]
    else
    if result.YMandatory or (ACol=0) then
       AList:=result.ValuesList[ACol]
    else
       AList:=result.ValuesList[ACol-1];
  end;

var tmp : Integer;
    t   : Integer;
begin
  AList:=nil;

  if Grid3DMode then result:=GetXYZSeries
  else
  begin
    if FLabels then Dec(ACol);

    {$IFNDEF TEEOCX}
    if FColors then Dec(ACol);
    {$ENDIF}

    if ACol>=0 then
    begin
      if Assigned(FSeries) then
      begin
        tmp:=FSeries.ValuesList.Count;
        if not IHasNo[0] then Dec(tmp);

        if (tmp>=ACol) then
        begin
          result:=FSeries;
          [b]GetAList(0);[/b]
          Exit;
        end;
      end
GetSeries Called GetAList(0),but in GetAList procedure,used "ACol-1",in my case,IHasNo[0] is true,then it called "AList:=result.ValuesList[ACol-1]"

Posted: Wed Dec 20, 2006 10:59 am
by yeray
Hello mustapha.wang,
Generally,I always delete Tee*.* under delphi\lib,
and I am sure to compiled and used 7.07 source.
probably deleting those files you're only removing teechart packages shipped with delphi, but not other v7 packages. Could you please check that you don't have other older TeeChart packages in your machine?
I am not sure this posted code if forbided by you.If so,sorry and please delete as soon as possible.
Posting small TeeChart sources code snippet generally is not a problem.

Posted: Thu Dec 21, 2006 1:02 am
by 9348276
I am sure: I unloaded old version teechar package in delphi IDE,I delete tee*.dcp under lib,Tee*.bpl,dclTee*.bpl under system32,Tee*.dcu under lib,move 7.07 directory in libray path to topmost.Recompile 7.07 all source code,and installed 7.07 package.
My os is windows 2003,chinese traditional.
I fixed it like this:

Code: Select all

Function TCustomChartGrid.GetSeries(ACol:Integer; Var AList:TChartValueList):TChartSeries;

  procedure GetAList(Index:Integer);
  begin
//    if IHasNo[Index] then    //delete by wxh
    if IHasNo[Index] and (ACol>0) then  //add by wxh
       AList:=result.ValuesList[ACol-1]
    else
    if result.YMandatory or (ACol=0) then
       AList:=result.ValuesList[ACol]
//    else               //delete by wxh
    else if ACol>0 then  //add by wxh
       AList:=result.ValuesList[ACol-1];
  end;

Posted: Thu Dec 21, 2006 11:20 am
by yeray
Hello mustapha.wang,
We still cannot reproduce the issue. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

Please, send your project to the public attachments newsgroup at news://steema.public.attachments

Thanks in advance

Posted: Fri Dec 22, 2006 9:50 am
by narcis
Hi mustapha.wang,

Thanks for your example but we are still not able to reproduce the problem here either using v7.07 nor using v8 beta.

To try to reproduce the problem I've opened your example, opened the chart editor, went to the Series>DataSource tab and started adding some text in the "Text" column. Are those the steps we should follow or should we follow any particular step?

If you are interested we can also send you the information to download and beta-test TeeChart Pro v8 VCL, which is the version we are currently working in.