Swaping values and series in bar-chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Normand Peladeau
Newbie
Newbie
Posts: 30
Joined: Tue Dec 28, 2004 5:00 am
Contact:

Post by Normand Peladeau » Mon Oct 03, 2005 1:38 pm

Yes! It work fine! But why can't I get this simple application to work even when compiling on a newly installed D7 on a new computer?
narcis wrote:Hi Normand,

Did you test the .exe I posted?

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

Post by Narcís » Tue Oct 04, 2005 8:18 am

Hi Normand,

This may be a problem we have found on some ocasions. You could try changing the following line:

Code: Select all

  for I := 1 to NbOldSeries do BarChart.RemoveSeries(BarChart.Series[0]);
for this one:

Code: Select all

  for I := 1 to NbOldSeries do BarChart.Series[0].Free;
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

Normand Peladeau
Newbie
Newbie
Posts: 30
Joined: Tue Dec 28, 2004 5:00 am
Contact:

Post by Normand Peladeau » Tue Oct 04, 2005 8:14 pm

Great! It works! I will make sure the RemoveSeries is never used unless I see a note that it had been fixed.

Thanks!

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

Post by Narcís » Wed Oct 05, 2005 7:51 am

Hi Normand,

I wouldn't take that as a habbit as it doesn't happen on all ocasions. However, I'm glad to hear we finally found a solution for your problem.
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

Normand Peladeau
Newbie
Newbie
Posts: 30
Joined: Tue Dec 28, 2004 5:00 am
Contact:

Post by Normand Peladeau » Wed Oct 05, 2005 10:11 pm

I thought the two were functionnally equivalent, but you seems to suggest that they are not. Can you tell me the differences. Will using the .free method causes some memory leaks or some settings not to be set properly?
narcis wrote:Hi Normand,

I wouldn't take that as a habbit as it doesn't happen on all ocasions. However, I'm glad to hear we finally found a solution for your problem.

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

Post by Pep » Thu Oct 06, 2005 8:09 am

Hi Normand,

The RemoveSeries method deletes (but not destroys) the specified ASeries parameter from the Chart list of series.

Calling this method is exactly the same as doing:

ASeries.ParentChart := nil ;

The Free method frees the Serie of Class SeriesClass.

Post Reply