Exception with loading template files

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
VH1
Advanced
Posts: 105
Joined: Thu May 13, 2004 4:00 am
Location: UK

Exception with loading template files

Post by VH1 » Fri Mar 16, 2007 2:55 pm

Version
1.1.2531.28391

Steps to create exception: -
1/ Create a chart.
2/ Add a Bar Series.
3/ Add random data.
4/ Add a "Mark Tips" Tool from the TeeChart Editor Tools Section.
5/ Verify the tooltips are showing.
6/ Open TeeChart Editor, select the added Mark Tips tool and uncheck the Active checkbox and press Close.
7/ Now execute the following: -

this.tChart1.Export.Template.Save("test.ten");
this.tChart1.Import.Template.Load("test.ten");

You will find that when Loading the template file, you will get an exception.
System Exception : - "Exception has been thrown by the target of an invocation."
Inner Exception : -"Object Reference not set to an instance of an object"

Please bear in mind, that I can follow the same process above and use the "Draw Line" tool and it works fine.

Therefore I conclude, that when using the "Mark Tips" tool, the template file is incorrect after making the tool inactive.

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 Mar 16, 2007 3:37 pm

Hi VH1,

I could reproduce the issue here using TeeChart for .NET v1 and also checked that this works fine using TeeChart for .NET v2. A workaround for v1 would be enabling the tool before exporting and disabling it after exporting, for example:

Code: Select all

		private System.IO.MemoryStream stream;

		private void button1_Click(object sender, System.EventArgs e)
		{
			stream = new System.IO.MemoryStream();
			
			markTips1.Active = true;
			tChart1.Export.Template.Save(stream);
			markTips1.Active = false;
		}
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

VH1
Advanced
Posts: 105
Joined: Thu May 13, 2004 4:00 am
Location: UK

Post by VH1 » Fri Mar 16, 2007 3:58 pm

Will there be an issue number raised for this so that I can track it please?

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 Mar 16, 2007 4:07 pm

Hi VH1,

The issue has been logged (TF02012132) to be considered if a new v1 release is made at any stage and this issue can be easily fixed.
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