Bug in TCustomDBChart.CheckNewDataSource

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Aleksey_Timonin
Newbie
Newbie
Posts: 3
Joined: Thu Jul 07, 2005 4:00 am

Bug in TCustomDBChart.CheckNewDataSource

Post by Aleksey_Timonin » Sun Dec 25, 2005 11:33 am

Hi all!
There is a bug in TCustomDBChart.CheckNewDataSource method. The method creates new TDBChartDataSource every time it called and adds it as Item to IDataSources list. Searching the input parameter ADataSet always fail.
So my application using memory growth all the time, because I call frequently the CheckDataSource method for all 15 Series in my Chart.
I use 7.04 version of TeeChart. Is there any quick way you may suggest me to fix the problem?

Thanks a lot
Aleksey

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

Post by Pep » Mon Jan 02, 2006 5:34 pm

Hi Aleksey,

yes, it seems there's a bug (the ADadaSet is not recognized). I've added it on our defect list and a fix for it will be considered to inclusion for the next maintenance releases. In meantime a workaround coud be to do :

Code: Select all

for I := 0 to IDataSources.Count - 1 do
    if TDBChartDataSource(IDataSources[i]).Dataset = ADataset then
      Exit;
just before the creation of the TDBChartDataSource.
tmpDataSource:=TDBChartDataSource.Create(nil); { 5.02 }

Post Reply