Page 1 of 1
Handling Series Editor Exception
Posted: Thu Jun 21, 2007 4:38 pm
by 9643892
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);
}
}
Posted: Fri Jun 22, 2007 8:20 am
by narcis
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.
Handling Series Editor Exemptions
Posted: Fri Jun 22, 2007 12:27 pm
by 9643892
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.
Posted: Fri Jun 22, 2007 2:04 pm
by narcis
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.
Handling Series Editor Exemptions
Posted: Sun Jun 24, 2007 4:55 pm
by 9643892
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.
Posted: Mon Jun 25, 2007 7:40 am
by narcis
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.
Handling Series Editor Exception
Posted: Mon Jun 25, 2007 2:44 pm
by 9643892
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
Posted: Tue Jun 26, 2007 3:19 pm
by narcis
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.
Handling Series Editor Exception
Posted: Tue Jun 26, 2007 4:54 pm
by 9643892
Hi Narcís,
When this release is going to be available?
Posted: Wed Jun 27, 2007 6:58 am
by narcis
Hi Nellie,
No release date has been fixed yet. Please be aware at this forum for its announcement.
Thanks in advance.
Handling Series Editor Exception
Posted: Wed Jun 27, 2007 4:49 pm
by 9643892
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.
Posted: Thu Jun 28, 2007 10:51 am
by narcis
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.
Handling Series Editor Exception
Posted: Thu Jun 28, 2007 10:16 pm
by 9643892
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.
Posted: Mon Jul 02, 2007 10:49 am
by narcis
Hi Nellie,
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.
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.
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.
Yes, I could reproduce the problem here and added it to our wish-list to be enhanced for future releases.