Handling Series Editor Exception

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exception

Post by Nellie » Thu Jun 21, 2007 4:38 pm

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);

}

}
Last edited by Nellie on Mon Jun 25, 2007 2:35 pm, edited 1 time in total.

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

Post by Narcís » Fri Jun 22, 2007 8:20 am

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.
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

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exemptions

Post by Nellie » Fri Jun 22, 2007 12:27 pm

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.

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

Post by Narcís » Fri Jun 22, 2007 2:04 pm

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.
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

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exemptions

Post by Nellie » Sun Jun 24, 2007 4:55 pm

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.

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

Post by Narcís » Mon Jun 25, 2007 7:40 am

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.
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

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exception

Post by Nellie » Mon Jun 25, 2007 2:44 pm

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

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

Post by Narcís » Tue Jun 26, 2007 3:19 pm

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.
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

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exception

Post by Nellie » Tue Jun 26, 2007 4:54 pm

Hi Narcís,

When this release is going to be available?

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

Post by Narcís » Wed Jun 27, 2007 6:58 am

Hi Nellie,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exception

Post by Nellie » Wed Jun 27, 2007 4:49 pm

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.

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 Jun 28, 2007 10:51 am

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.
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

Nellie
Newbie
Newbie
Posts: 12
Joined: Thu Jan 18, 2007 12:00 am

Handling Series Editor Exception

Post by Nellie » Thu Jun 28, 2007 10:16 pm

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.

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

Post by Narcís » Mon Jul 02, 2007 10:49 am

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.
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