Page 1 of 1

Bug in TCustomDBChart.CheckNewDataSource

Posted: Sun Dec 25, 2005 11:33 am
by 9342681
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

Posted: Mon Jan 02, 2006 5:34 pm
by Pep
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 }