Designtime,listindex out of bounds(-1)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mustapha.wang
Newbie
Newbie
Posts: 4
Joined: Tue Dec 05, 2006 12:00 am

Designtime,listindex out of bounds(-1)

Post by mustapha.wang » Mon Dec 18, 2006 6:52 am

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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Dec 18, 2006 10:10 am

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.

mustapha.wang
Newbie
Newbie
Posts: 4
Joined: Tue Dec 05, 2006 12:00 am

Post by mustapha.wang » Tue Dec 19, 2006 2:38 am

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.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Dec 19, 2006 9:47 am

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?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

mustapha.wang
Newbie
Newbie
Posts: 4
Joined: Tue Dec 05, 2006 12:00 am

Post by mustapha.wang » Wed Dec 20, 2006 4:07 am

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]"

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Dec 20, 2006 10:59 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

mustapha.wang
Newbie
Newbie
Posts: 4
Joined: Tue Dec 05, 2006 12:00 am

Post by mustapha.wang » Thu Dec 21, 2006 1:02 am

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;

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Thu Dec 21, 2006 11:20 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Dec 22, 2006 9:50 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply