TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Thu Jul 23, 2009 8:52 am
I have an MDI application, and my charts are on frames, and these frames are (dynamically) placed (fromes on frames etcetera) on MDI forms.
This induces a problem when my user wants to add a new calculated series to a chart using the chart editor: the source series list is empty.
I have managed to patch the TeeFuncEdit sourcecode where the list is actually filled. Please consider adding the modified code to the next Teechart8 release.
Regards
Hans
These are the patched functions:
Code: Select all
procedure AddFrom(Component:TComponent; const Prefix:String);
var t : Integer;
begin
with Component do
for t:=0 to ComponentCount-1 do
if Components[t] is TChartSeries then
{$ifdef HH_PATCH_TC_FILLSOURCES}
begin
{$endif}
if Components[t] is TChartSeries then
AddSource(TChartSeries(Components[t]),Prefix);
{$ifdef HH_PATCH_TC_FILLSOURCES}
// HH: recurse because actually series may be owned by other components as well!
AddFrom(Components[t],'');
end;
{$endif}
end;
procedure AddMDISources;
var t : Integer;
begin
with Application.MainForm.ActiveMDIChild do // 8.0 TV52012071
for t:=0 to ComponentCount-1 do
{$ifdef HH_PATCH_TC_FILLSOURCES}
// HH: Charts may, off course, also reside on frames of MDI forms
if (Components[t] is TCustomChart) or (Components[t] is TCustomFrame) then
{$else}
if Components[t] is TCustomChart then
{$endif}
begin
if Assigned(TheSeries.Owner) then
AddFrom(TheSeries.Owner,'');
break;
end;
end;
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Thu Jul 23, 2009 1:18 pm
Hi Hans,
Thank you for the information and the fix suggestion. It would be nice if you could also send us a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Thu Jul 23, 2009 1:55 pm
Managed to add small app. You may have to adjust search paths, off course. For debugging purpose i have added a path to my Teechart8 sources.
Reproduce:
Runn app
Open clild MDI window
Open chart editor
Add anew series/or function eg "Add"
Check source series list. It's empty.
Regards - Hans
-
Attachments
-
- MDITester.zip
- Demo app for MDI
- (12.68 KiB) Downloaded 245 times
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Thu Jul 23, 2009 2:01 pm
Yeray, can you change my status from newbie into something like 4 stars? I've been using TChart for over 8 years now! (SInce Delphi2 actually) and have some deep knowledge about it by now.
Also I seem to have joined this forum somewhere in 1970
. Thats weird since I was only 4 years old and had no computer at the time
Regards - Hans
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Fri Jul 24, 2009 8:57 am
Hi Hans,
We could reproduce the problem and your changes seems to work fine. So we'd like to thank you for giving it to us at the same time we'd like you to know that this will be included in the next v8 maintenance release.
h.hasenack wrote:Yeray, can you change my status from newbie into something like 4 stars? I've been using TChart for over 8 years now! (SInce Delphi2 actually) and have some deep knowledge about it by now.
Also I seem to have joined this forum somewhere in 1970
. Thats weird since I was only 4 years old and had no computer at the time
The forum ranks are assigned automatically. When you'll arrive at 100 posts your forums rank will be "advanced" and with 1000 posts you'll be known as "gurú". I think we can manage the ranks (add more ranks or change the .gif related with each rank) if you feel really uncomfortable with that right now.
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Fri Jul 24, 2009 9:03 am
The forum ranks are assigned automatically. When you'll arrive at 100 posts your forums rank will be "advanced" and with 1000 posts you'll be known as "gurú". I think we can manage the ranks (add more ranks or change the .gif related with each rank) if you feel really uncomfortable with that right now.
Yes it would be nice, but I will survive -and won't sleep less- if you you rather invest your time in other, more important things.
I am very happy my source suggestions and fixes are taken up seriously, thanks!
Hans