v.8.01 - Is it a bug? (ChartEditor again)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Miket
Newbie
Newbie
Posts: 23
Joined: Thu Apr 15, 2004 4:00 am
Location: Russia, Moscow
Contact:

v.8.01 - Is it a bug? (ChartEditor again)

Post by Miket » Sun Jul 08, 2007 10:27 am

Hello,

In situations when by some reason a chart is updated with Chart Editor dialog opened it is easy to get an exception:

---------------------------
Project1
---------------------------
Control 'TabSeriesList' has no parent window.
---------------------------
OK
---------------------------

Obvious fix would be to avoid such situations, but maybe a better solution is possible? In complicated applications sometimes it is not easy to have full control on when and why a chart is updated.

Below you will find a simple example reproducing the problem:

1) Create a simple VCL application
2) Place TChart, TTimer and TButton on the main form
3) To make the problem more vivid set Chart1.Legend.LegendStyle = lsSeries
4) Arrange the code of Unit1.pas as follows.

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart, StdCtrls, TeeEdit;

type
  TForm5 = class(TForm)
    Timer1: TTimer;
    Button1: TButton;
    Chart1: TChart;
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    Count: Integer;
  public
    { Public declarations }
  end;

var
  Form5: TForm5;

implementation

uses EditChar, TeeEditCha;

{$R *.dfm}

procedure TForm5.Button1Click(Sender: TObject);
begin
  EditChartPage( Self, Chart1, teeEditGeneralPage );
//  EditChartPage( Self, Chart1, teeEditAxisPage );
//  EditChartPage( Self, Chart1, teeEditMainPage );
end;

procedure TForm5.FormCreate(Sender: TObject);
begin
  Count := 0;
  Chart1.AddSeries(TFastLineSeries);
  Chart1[0].FillSampleValues(100);
  Timer1Timer(Self);
end;

procedure TForm5.Timer1Timer(Sender: TObject);
begin
  Chart1[0].Title := 'Title ' + IntToStr(Count);
  Inc(Count);
  if Count >= 10 then
    Count := 0;
end;

end.
You may experiment with commenting different lines in the Button1Click event handler.

Best regards,
Michael

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 09, 2007 10:05 am

Hi Michael,

yes, you're correct , it's a bug. I've fixed it for the next maintenance release, it only happens when Editor is set to Tree mode.
If you're source code customer let me know and I could send to you the modified file so you can recompile the sources and install them again.

Miket
Newbie
Newbie
Posts: 23
Joined: Thu Apr 15, 2004 4:00 am
Location: Russia, Moscow
Contact:

Post by Miket » Mon Jul 09, 2007 1:05 pm

Hi Josep,

Yes, I am source code customer (v.8). I've just sent my license details in PM to you.

Of course, I am interested in the latest modifications of the source code.

Best regards,
Michael

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 09, 2007 9:56 pm

Hi Michael,

ok, I've sent the required files to fix this bug directly to your mail account.

Miket
Newbie
Newbie
Posts: 23
Joined: Thu Apr 15, 2004 4:00 am
Location: Russia, Moscow
Contact:

Post by Miket » Tue Jul 10, 2007 7:18 am

Hi Josep,

Thank you for the fix, now everything works fine!

Best regards,
Michael

xxxxxx
Advanced
Posts: 128
Joined: Tue Jun 19, 2007 12:00 am
Location: Russia
Contact:

Post by xxxxxx » Wed Jul 18, 2007 9:38 pm

I have similar problem with Chart Editor in TeeChart Standard v.7/Delphi 5:

Code: Select all

var
  ChartEditor:TChartEditForm;
begin
  ChartEditor:=TChartEditForm.Create(ParentForm);
  ChartEditor.TheActivePageIndex:=teeEditAxisPage;
  ChartEditor.Tree.Visible:=ShowTree;
  ChartEditor.ShowModal;
  ChartEditor.Free;
end;
This code produced the same error about 'TabSeriesList' if ShowTree was True.
In my TeeChart Standard v.8/Delphi 5 such problem is absent

Post Reply