Handling Series Editor Exception
Handling Series Editor Exception
Hello,
I need to be able to catch an exception thrown by the Series Editor when an invalid selection is made.
For example, in the ‘data source’ tab I select the ‘mode’ function, move 2 series to the ‘selected’ listbox, and click ‘Apply’ button; the TeeChart throws an exception (it happens in chSeriesEditor.ShowDialog() in the example below).
The goal is to show a custom message when the exception is thrown but when the ‘catch’ code gets executed, the dialog box disappears.
Is there a way to show the message and have the dialog box remain on the screen?
Thanks for your help.
Here is the code I use:
{
try
{
frmGallery frmNewSeries = new frmGallery();
frmNewSeries.ICIChart = tChart1;
if (DialogResult.OK == frmNewSeries.ShowDialog())
{
string strFunctionType;
string strSeriesLabel = SetSeriesLabel(frmNewSeries);
Steema.TeeChart.Styles.Series srNewSeries =
Chart1.Series.Add(frmNewSeries.CurrentSeries);
srNewSeries.Title = strSeriesLabel;
strFunctionType = frmNewSeries.FunctionType;
clsEditor.NewFunction = strSeriesLabel;
clsEditor.FunctionType = strFunctionType;
if (!string.IsNullOrEmpty(strFunctionType))
{
chEditor.Close();
Steema.TeeChart.Editors.ChartEditor chSeriesEditor =
clsEditor.ShowSeriesEditor(tChart1);
chSeriesEditor.MinimizeBox = false;
chSeriesEditor.MaximizeBox = false;
chSeriesEditor.HelpButton = false;
chSeriesEditor.ShowDialog();
}
}
}
}
catch (System.Exception TCex)
{
MessageBox.Show(TCex.Message);
}
}
I need to be able to catch an exception thrown by the Series Editor when an invalid selection is made.
For example, in the ‘data source’ tab I select the ‘mode’ function, move 2 series to the ‘selected’ listbox, and click ‘Apply’ button; the TeeChart throws an exception (it happens in chSeriesEditor.ShowDialog() in the example below).
The goal is to show a custom message when the exception is thrown but when the ‘catch’ code gets executed, the dialog box disappears.
Is there a way to show the message and have the dialog box remain on the screen?
Thanks for your help.
Here is the code I use:
{
try
{
frmGallery frmNewSeries = new frmGallery();
frmNewSeries.ICIChart = tChart1;
if (DialogResult.OK == frmNewSeries.ShowDialog())
{
string strFunctionType;
string strSeriesLabel = SetSeriesLabel(frmNewSeries);
Steema.TeeChart.Styles.Series srNewSeries =
Chart1.Series.Add(frmNewSeries.CurrentSeries);
srNewSeries.Title = strSeriesLabel;
strFunctionType = frmNewSeries.FunctionType;
clsEditor.NewFunction = strSeriesLabel;
clsEditor.FunctionType = strFunctionType;
if (!string.IsNullOrEmpty(strFunctionType))
{
chEditor.Close();
Steema.TeeChart.Editors.ChartEditor chSeriesEditor =
clsEditor.ShowSeriesEditor(tChart1);
chSeriesEditor.MinimizeBox = false;
chSeriesEditor.MaximizeBox = false;
chSeriesEditor.HelpButton = false;
chSeriesEditor.ShowDialog();
}
}
}
}
catch (System.Exception TCex)
{
MessageBox.Show(TCex.Message);
}
}
Last edited by Nellie on Mon Jun 25, 2007 2:35 pm, edited 1 time in total.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
Would you be so kind to send us a simple example project we can run "as-is", let us know the exact steps we should follow to reproduce the problem here and the TeeChart version you are using?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Would you be so kind to send us a simple example project we can run "as-is", let us know the exact steps we should follow to reproduce the problem here and the TeeChart version you are using?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 |
Handling Series Editor Exemptions
Hi Narcís,
I'm not sure there is a simple way for me to send you a sample project, I would have to create one. The Series Editor dialog we use in our application is custom derived from the TeeChart Editor.
We're using TeeChart.net v.2.
Do you have any suggestions for me otherwise?
Your help is greatly appreciated.
I'm not sure there is a simple way for me to send you a sample project, I would have to create one. The Series Editor dialog we use in our application is custom derived from the TeeChart Editor.
We're using TeeChart.net v.2.
Do you have any suggestions for me otherwise?
Your help is greatly appreciated.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
There's no need to use your custom series editor dialog. It would be great if you could keep it as simple as possible and arrange an example so that we can reproduce the problem here and try to find a solution to it.
Thanks in advance.
There's no need to use your custom series editor dialog. It would be great if you could keep it as simple as possible and arrange an example so that we can reproduce the problem here and try to find a solution to it.
Thanks in advance.
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 |
Handling Series Editor Exemptions
Hi Narcís,
I've uploaded the sample app to your server.
The steps to reproduce: select 'mode' function, select 2 series, click 'apply' button. As you can see after the error message gets displayed, the Editor dialog disappears.
Thanks for your help.
I've uploaded the sample app to your server.
The steps to reproduce: select 'mode' function, select 2 series, click 'apply' button. As you can see after the error message gets displayed, the Editor dialog disappears.
Thanks for your help.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
Thank you very for the project but it's still unclear to me how should I exactly reproduce the error. Would you be so kind to post the exact steps we should follow to reproduce the problem here?
Thanks in advance.
Thank you very for the project but it's still unclear to me how should I exactly reproduce the error. Would you be so kind to post the exact steps we should follow to reproduce the problem here?
Thanks in advance.
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 |
Handling Series Editor Exception
Hi Narcís,
You need to:
1. on the main form click 'Editor' button
2. in TeeChart Editor click 'Add' button
3. select 'Function' tab
4. on 'Standard' tab select 'Mode' function
5. select 'Hollow' sub-function
6. click 'Ok' button on 'Functions' tab
7. it brings the 'Data Source' tab; there move 2 series from 'available' to 'selected' listview
8. click 'Apply' button.
It throws an exception with pretty much any sub-functions except maybe for the 'Normal'.
Hope it helps. Thanks
You need to:
1. on the main form click 'Editor' button
2. in TeeChart Editor click 'Add' button
3. select 'Function' tab
4. on 'Standard' tab select 'Mode' function
5. select 'Hollow' sub-function
6. click 'Ok' button on 'Functions' tab
7. it brings the 'Data Source' tab; there move 2 series from 'available' to 'selected' listview
8. click 'Apply' button.
It throws an exception with pretty much any sub-functions except maybe for the 'Normal'.
Hope it helps. Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
Thanks for the information. We have been able to reproduce the issue here and fixed it for the next TeeChart for .NET v3 maintenance release.
Thanks for the information. We have been able to reproduce the issue here and fixed it for the next TeeChart for .NET v3 maintenance release.
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 |
Handling Series Editor Exception
Hi Narcís,
When this release is going to be available?
When this release is going to be available?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
No release date has been fixed yet. Please be aware at this forum for its announcement.
Thanks in advance.
No release date has been fixed yet. Please be aware at this forum for its announcement.
Thanks in advance.
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 |
Handling Series Editor Exception
Hi Narcís,
Is there a chance you'll patch v.2 with this fix any time soon?
Or maybe you can suggest a work around.
This bug is affecting our product which is scheduled for release in a month.
Thanks.
Is there a chance you'll patch v.2 with this fix any time soon?
Or maybe you can suggest a work around.
This bug is affecting our product which is scheduled for release in a month.
Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
We will try to apply the fix to v2 as well and we expect to have a new maintenance release ready during the first half of July.
Please be aware at this forum for new release announcements.
Thanks in advance.
We will try to apply the fix to v2 as well and we expect to have a new maintenance release ready during the first half of July.
Please be aware at this forum for new release announcements.
Thanks in advance.
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 |
Handling Series Editor Exception
Hi Narcís,
I ran into another problem. It turns out that I can only catch this Series Editor exception in the debug mode; the compiled code does not execute my catch code. Any ideas? Thanks.
There is something else I noticed. In the Series Editor's Data Source tab select a function from the drop down list, select series, and click 'Apply' button. The 'Apply' button becomes disabled and remains disabed even if you select a different function. You need to move your series around to make it enabled again.
I ran into another problem. It turns out that I can only catch this Series Editor exception in the debug mode; the compiled code does not execute my catch code. Any ideas? Thanks.
There is something else I noticed. In the Series Editor's Data Source tab select a function from the drop down list, select series, and click 'Apply' button. The 'Apply' button becomes disabled and remains disabed even if you select a different function. You need to move your series around to make it enabled again.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Nellie,
This has already been fixed in v2 sources as well and the fix will be included in the next v2 maintenance release due to be out shortly.I ran into another problem. It turns out that I can only catch this Series Editor exception in the debug mode; the compiled code does not execute my catch code. Any ideas? Thanks.
Yes, I could reproduce the problem here and added it to our wish-list to be enhanced for future releases.There is something else I noticed. In the Series Editor's Data Source tab select a function from the drop down list, select series, and click 'Apply' button. The 'Apply' button becomes disabled and remains disabed even if you select a different function. You need to move your series around to make it enabled again.
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 |