EInvalidOperation with Chart Editor
EInvalidOperation with Chart Editor
Hi, I keep randomly getting the following message:
EInvalidOperation with message 'Control TabSeries' has no parent window.
This happens on a ChartEditor component when I am going through the Axis tabs.
It is also set to TreeView mode, if this helps.
Thanks,
Johann.
EInvalidOperation with message 'Control TabSeries' has no parent window.
This happens on a ChartEditor component when I am going through the Axis tabs.
It is also set to TreeView mode, if this helps.
Thanks,
Johann.
This mostly happens in ChartEditor if both Chart and Series properties are entered.
To reproduce it to the following:
1) Drop TChart, TChartEditor on a form
2) Create a new series (leave the default, doesn't matter)
3) Set the Chart and Series properties
4) Set TreeView to True
5) Change DefaultTab to anything other than cetMain
6) Double click chart component to test
7) Exception raised
Any reason why this is happening?
Johann
To reproduce it to the following:
1) Drop TChart, TChartEditor on a form
2) Create a new series (leave the default, doesn't matter)
3) Set the Chart and Series properties
4) Set TreeView to True
5) Change DefaultTab to anything other than cetMain
6) Double click chart component to test
7) Exception raised
Any reason why this is happening?
Johann
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johann,
I'm not able to reproduce it here, I created a project as you told and when running it and executing the TChartEditor and selecting axes tabs I don't get the error. Is there anything that I should do to force this error or could you please send us an example we can run "as-is" to reproduce the problem here?
You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
I'm not able to reproduce it here, I created a project as you told and when running it and executing the TChartEditor and selecting axes tabs I don't get the error. Is there anything that I should do to force this error or could you please send us an example we can run "as-is" to reproduce the problem here?
You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johann,
Thanks for the example application. I've been able to reproduce the problem here. This is a "silly" bug which you can solve using:
Thanks for the example application. I've been able to reproduce the problem here. This is a "silly" bug which you can solve using:
Code: Select all
ChartEditor1.Series := nil;
ChartEditor1.Execute;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Lars,
Yes, I've checked that and added the issue (TV52011310) to our defect list to be fixed for future releases. In the meantime, a workaround is using the code I posted on 3rd October 2005.
Yes, I've checked that and added the issue (TV52011310) to our defect list to be fixed for future releases. In the meantime, a workaround is using the code I posted on 3rd October 2005.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Regretfully, your workaround doesn't work when opening the property editor using the method EditChart(). I've tried to use a modified version like this:
but it still gives the EInvalidOperation error. Does your wrokaround only work when using the ChartEditor component? I have tried to use that too, but then I cannot get it to open in treeview mode without setting the registry setting first.
Code: Select all
Procedure EditChartPageTreeView(Form:TForm; AChart:TCustomChart; PageIndex:Integer);
begin
With GetChartEditClass(AChart) do
try
TheEditSeries:=nil;
TheActivePageIndex:=PageIndex;
Tree.Visible:=True;
ShowModal;
finally
Free;
end;
end;