Page 1 of 1

TContourMap series causes TMarkTipsTool failure

Posted: Mon Mar 14, 2005 9:12 pm
by 9340003
I have a TContourMap series and a TMarkTipsTool (no Series assigned, i.e. works with all series). While the contour map is empty, everything is fine. Next I add data to the contour map. Everything is fine.
Now if I clear the contour map (Active := false; Clear;), subsequent mouse moves will attempt to show marks for the empty and inactive contour map. In effect, the following code in TeEngine fails:

Code: Select all

Function TChartSeries.GetMarkValue(ValueIndex:Integer):Double;
begin
  result:=MandatoryValueList.Value[ValueIndex];
end;
ValueIndex is set to some values such as 4, 8, etc. but the value list is empty.

I need to load and clear the contour map series from time to time, but after the first clearing and deactivating, the above code causes access violation.[/code]

Posted: Tue Mar 15, 2005 9:05 am
by narcis
Hi Thomas,

Have you tried deleting (clearing) the series using the delete method? The line below deletes all points from a series.

Code: Select all

Series1.Delete(0,Series1.Count-1);

Posted: Tue Mar 15, 2005 6:15 pm
by 9340003
Thanks Narcís, clearing the series with the recommended Delete removed everything successfully, so there are no more rogue calls to GetMarkValue.
I still think that Series1.Clear should do the same or am I missing something here?

Posted: Wed Mar 16, 2005 11:05 am
by narcis
Hi Thomas,
I still think that Series1.Clear should do the same or am I missing something here?
Yes, you are right. I've included this to our defect list to be fixed for next releases. Luckily there's the delete workaround.

Posted: Thu Mar 17, 2005 6:38 pm
by 9340003
Thanks Narcís. I am never against a workaround as long as there are plans to pave the straight path :D

Posted: Fri Mar 18, 2005 9:47 am
by narcis
Hi Thomas,

Of course, that's the goal of our bug list. Every release fixes some of them.