Page 1 of 1

bcb6 703 TNearestTool::GetNearest not found.

Posted: Thu Mar 17, 2005 5:46 pm
by 8576762
I'm using C++ builder 6 with teechart 7.0.3. (I will upgrade to 7.0.4 later today.)

I'm trying to use the TNearestTool::GetNearestPoint method,
and the compiler gives me the following error:
[C++ Error] unit2.cpp(6326): E2285 Could not find a match for 'TNearestTool::GetNearestPoint(TChartSeries *,int,int)'
[C++ Error] unit2.cpp(6389): E2285 Could not find a match for 'TNearestTool::GetNearestPoint(TChartSeries *,int,int,int)'

You can see that I tried matching both forms of the function (with and without the final bool).
I checked the header file, and it looks OK...
What's going on here?

Posted: Fri Mar 18, 2005 10:38 am
by narcis
Hi Jon,

That may be because you have to define the metaclass like:

Code: Select all

ChartTool1->GetNearestPoint(__classid(TChartSeries),Chart1->Series[0],X,Y);
If you already know the series type then you'd better use it, i.e.: TLineSeries.

Posted: Mon Mar 21, 2005 8:02 pm
by 9234333
Thanks Nancy, using the graph type as the initial parameter worked.

The description in the help file was wrong, though.

function GetNearestPoint(Series: TChartSeries; x, y: Integer): Integer; overload;

The header file, obviously, had it right.