Gouge series with C++/CLI

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bioscan
Newbie
Newbie
Posts: 1
Joined: Mon May 18, 2009 12:00 am

Gouge series with C++/CLI

Post by bioscan » Tue Jul 21, 2009 9:15 am

HI.
I am working with VS 2008 C++/CLI winform application
when i try to add LinearGouge to tChart i get compilation errors (see below).
i get errors with all gouge series but only with them
when i add this series to C# winform application everithing works fine

are you familiar with this problem?
any suggestion of how to resolve this problem?

thanks.


the errors:


error RG0000: Type could not be read from the data in line 157, position 5. The type's internal structure may have changed. Either implement ISerializable on the type or provide a type converter that can provide a more reliable conversion format, such as text or an array of bytes. The conversion exception was: Unable to find assembly 'TeeChart, Version=4.0.0.15034, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'.

1>d:\Dev\eee\eee\Form1.resX : error RG0000: Specific exception: "XmlException" Message: "Type could not be read from the data in line 157, position 5. The type's internal structure may have changed. Either implement ISerializable on the type or provide a type converter that can provide a more reliable conversion format, such as text or an array of bytes. The conversion exception was: Unable to find assembly 'TeeChart, Version=4.0.0.15034, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'. ---> XmlException: Type could not be read from the data in line 157, position 5. The type's internal structure may have changed. Either implement ISerializable on the type or provide a type converter that can provide a more reliable conversion format, such as text or an array of bytes. The conversion exception was: Unable to find assembly 'TeeChart, Version=4.0.0.15034, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'. Line 157, position 5. ---> SerializationException: Unable to find assembly 'TeeChart, Version=4.0.0.15034, Culture=neutral, PublicKeyToken=9c8126276c77bdb7'."
1>2 error(s).

Yeray
Site Admin
Site Admin
Posts: 8776
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Gouge series with C++/CLI

Post by Yeray » Tue Jul 21, 2009 11:04 am

Hi bioscan,

I could reproduce the error and added it to the wish list to be fixed in a further maintenance release (TF02014299).
By the meanwhile, adding it by code it seems to work fine. Could you try it?

Code: Select all

   private: Steema::TeeChart::Styles::LinearGauge^  linearGauge1;
   private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
      this->linearGauge1 = (gcnew Steema::TeeChart::Styles::LinearGauge());
      this->tChart1->Series->Add(this->linearGauge1);
   }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: Gouge series with C++/CLI

Post by Christopher » Wed Sep 16, 2009 9:54 am

Hello!
bioscan wrote: I am working with VS 2008 C++/CLI winform application
when i try to add LinearGouge to tChart i get compilation errors (see below).
i get errors with all gouge series but only with them
when i add this series to C# winform application everithing works fine
We've had a look at this one and at the moment have been unable to find a resolution to it. The issue appears to be a defect in the c++ winforms designer. As Yeray mentioned, adding in a gauge series type at runtime works fine. Not only that, but binary serialization also appears to be uneffected, e.g.

Code: Select all

	private: Steema::TeeChart::TChart^ tChart1;
	private: Steema::TeeChart::TChart^ tChart2; 

	private:	void InitializeChart(void)	 
		{
			this->tChart1 = (gcnew Steema::TeeChart::TChart());
			this->tChart1->Dock = System::Windows::Forms::DockStyle::Fill;
			this->panel1->Controls->Add(this->tChart1);

			this->tChart2 = (gcnew Steema::TeeChart::TChart());
			this->tChart2->Dock = System::Windows::Forms::DockStyle::Fill;
			this->panel2->Controls->Add(this->tChart2);

			Steema::TeeChart::Styles::CircularGauge^ series1 = (gcnew Steema::TeeChart::Styles::CircularGauge(this->tChart1->Chart));
			series1->FillSampleValues();
		}

	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
					 {
						 System::IO::MemoryStream^ ms = (gcnew System::IO::MemoryStream());
						 this->tChart1->Export->Template->Save(ms);
						 ms->Position=0;
						 this->tChart2->Import->Template->Load(ms);
			
					 }
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply