AV in drawing chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

AV in drawing chart

Post by TestAlways » Wed Oct 08, 2008 8:03 pm

I am getting an AV in a chart and am not sure what to look at--below is the call stack when it occurs. Any ideas what I might look at?

Edward Dressel

:7c812aeb kernel32.RaiseException + 0x52
:00405984 NotifyNonDelphiException + $1C
:7c90327a ntdll.RtlConvertUlongToLargeInteger + 0x3c
:7c90e46a ntdll.KiUserExceptionDispatcher + 0xe
:0065909a DrawLegendItem + $4AE
:00659403 DrawItems + $83
:0065a31b TCustomChartLegend.DrawLegend + $4FF
:0065575c TCustomChart.DrawTitlesAndLegend + $7C
:0064d77c TCustomAxisPanel.InternalDraw + $C0
:00634468 TCustomTeePanel.Draw + $78
:00634239 TCustomTeePanel.Draw + $21
Controls.TWinControl.PaintHandler((15, 0, 0, 0))
Controls.TWinControl.WMPaint((15, 0, 0, 0))
Controls.TCustomControl.WMPaint(???)
Controls.TControl.WndProc(???)
Controls.TWinControl.WndProc((15, 0, 0, 0, 0, 0, 0, 0, 0, 0))
Controls.TWinControl.MainWndProc(???)
Classes.StdWndProc(265578,15,0,0)
:7e418734 USER32.GetDC + 0x6d
:7e418816 ; C:\WINDOWS\system32\USER32.dll
:7e428ea0 ; C:\WINDOWS\system32\USER32.dll
:7e428eec ; C:\WINDOWS\system32\USER32.dll
:7c90e453 ntdll.KiUserCallbackDispatcher + 0x13
:7e4196c7 USER32.DispatchMessageA + 0xf
Forms.TApplication.ProcessMessage(???)

TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Post by TestAlways » Wed Oct 08, 2008 8:17 pm

I fond the problem causing the code-trying to set the index of a series. (See code below).

How do I set the position of a series?

Thanks
Ed Dressel


var
lIdx: integer;

procedure SetSeriesVisible(aSeries: TLineSeries; aVisible: boolean);
begin
if aVisible then
begin
aSeries.ParentChart := chrtRMDValues;
// removing this next line fixed it
chrtRMDValues.SeriesList[lIdx] := aSeries;
inc(lIdx);
end
else
aSeries.ParentChart := nil;
end;

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

Post by Narcís » Thu Oct 09, 2008 8:41 am

Hi Ed,

You can use ExchangeSeries method for that as explained here.

Hope this helps!
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

Post Reply