Page 1 of 1

Gouge series with C++/CLI

Posted: Tue Jul 21, 2009 9:15 am
by 15653298
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).

Re: Gouge series with C++/CLI

Posted: Tue Jul 21, 2009 11:04 am
by yeray
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);
   }

Re: Gouge series with C++/CLI

Posted: Wed Sep 16, 2009 9:54 am
by Chris
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);
			
					 }