Serialization problems at design-time

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Serialization problems at design-time

Post by Luigi S. » Fri Dec 12, 2008 1:58 pm

Hi all,
I experienced an annoying problem on an user frame containing a TChart.
A few time after I open the frame in the designer, a message box containing the following error :

Code: Select all

Type 'System.Drawing.Color, System.Drawing, Version 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not implement the IXmlSerializable interface therefore can not proceed with serialization. 
appears.

The message box is shown several times (about ten) and the error seems periodical (once I confirmed the ten errors, I can continue to work normally but after a few time the error reoccurs ...)
It also happens when i compile my solution, but oddly there is no problem at runtime :? .

Any suggestions ?

Thanks.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

noaksey
Newbie
Newbie
Posts: 55
Joined: Wed May 23, 2007 12:00 am

Post by noaksey » Fri Dec 12, 2008 2:49 pm

Yeh I kept having this problem - nothing more annoying than a damn messagebox coming up every 2 seconds when you try to go to the designer view...

To fix the error in mine I put:-

Code: Select all

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
above all the Properties in the class deriving from TChart.

edit: you may also need to delete the control from the form and re-add it once you have done the above and recompiled it.

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 Dec 12, 2008 2:51 pm

Hi Luigi,

Your problem be the same as I described here:

http://www.teechart.net/support/viewtopic.php?t=3239

Removing Steema.TeeChart.Styles.ColorList references from *.resx file solves the issue. Could you please check if it works fine for you?

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

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Fri Dec 12, 2008 3:16 pm

narcis wrote:Hi Luigi,

Removing Steema.TeeChart.Styles.ColorList references from *.resx file solves the issue. Could you please check if it works fine for you?

Thanks in advance.
I didn't found any reference to the ColorList class in .resx files, but I found one in the *_Designer.cs file of the implied User Frame....

Code: Select all

this.seriesMixed.Colors = ((Steema.TeeChart.Styles.ColorList)(resources.GetObject("seriesMixed.Colors")));
I solved removing the Shape series that used it (I forgot it into the frame :roll: , but I don't actually need it :-D !!!).
For now this solution seems to work ...

Thanks again :)
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Fri Dec 12, 2008 3:58 pm

13046530 wrote: For now this solution seems to work ...
Mmmm.... no, not exactly :? ... there are still some problems :( .
The designer seems to "move" the ColorList, adding automatically the line

Code: Select all

this.seriesMixed.Colors = ((Steema.TeeChart.Styles.ColorList)(resources.GetObject("seriesMixed.Colors")));
for another series (seriesMixed) that I have into the chart...

The content of the "seriesMixed.Colors" resource is a blob :

Code: Select all

<data name="seriesMixed.Colors" mimetype="application/x-microsoft.net.object.binary.base64">
  <value>
    AAEAAAD/////AQAAAAAAAAAMAgAAAFJUZWVDaGFydCwgVmVyc2lvbj0zLjUuMzE0Ni4yNDgwNSwgQ3Vs
    dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05YzgxMjYyNzZjNzdiZGI3DAMAAABRU3lzdGVtLkRy
    YXdpbmcsIFZlcnNpb249Mi4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNm
    NWY3ZjExZDUwYTNhBQEAAAAgU3RlZW1hLlRlZUNoYXJ0LlN0eWxlcy5Db2xvckxpc3QDAAAADUxpc3Rg
    MStfaXRlbXMMTGlzdGAxK19zaXplD0xpc3RgMStfdmVyc2lvbgQAABZTeXN0ZW0uRHJhd2luZy5Db2xv
    cltdAwAAAAgIAgAAAAkEAAAAKAAAAHEBAAAHBAAAAAABAAAAKAAAAAQUU3lzdGVtLkRyYXdpbmcuQ29s
    b3IDAAAABfv///8UU3lzdGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVz
    dGF0ZQEAAAAJBwcDAAAACgAAAAAAAAAAAAAAAAH6////+////woAAAAAAAAAAAAAAAAB+f////v///8K
    AAAAAAAAAAAAAAAAAfj////7////CgAAAAAAAAAAAAAAAAH3////+////woAAAAAAAAAAAAAAAAB9v//
    //v///8KAAAAAAAAAAAAAAAAAfX////7////CgAAAAAAAAAAAAAAAAH0////+////woAAAAAAAAAAAAA
    AAAB8/////v///8KAAAAAAAAAAAAAAAAAfL////7////CgAAAAAAAAAAAAAAAAHx////+////woAAAAA
    AAAAAAAAAAAB8P////v///8KAAAAAAAAAAAAAAAAAe/////7////CgAAAAAAAAAAAAAAAAHu////+///
    /woAAAAAAAAAAAAAAAAB7f////v///8KAAAAAAAAAAAAAAAAAez////7////CgAAAAAAAAAAAAAAAAHr
    ////+////woAAAAAAAAAAAAAAAAB6v////v///8KAAAAAAAAAAAAAAAAAen////7////CgAAAAAAAAAA
    AAAAAAHo////+////woAAAAAAAAAAAAAAAAB5/////v///8KAAAAAAAAAAAAAAAAAeb////7////CgAA
    AAAAAAAAAAAAAAHl////+////woAAAAAAAAAAAAAAAAB5P////v///8KAAAAAAAAAAAAAAAAAeP////7
    ////CgAAAAAAAAAAAAAAAAHi////+////woAAAAAAAAAAAAAAAAB4f////v///8KAAAAAAAAAAAAAAAA
    AeD////7////CgAAAAAAAAAAAAAAAAHf////+////woAAAAAAAAAAAAAAAAB3v////v///8KAAAAAAAA
    AAAAAAAAAd3////7////CgAAAAAAAAAAAAAAAAHc////+////woAAAAAAAAAAAAAAAAB2/////v///8K
    AAAAAAAAAAAAAAAAAdr////7////CgAAAAAAAAAAAAAAAAHZ////+////woAAAAAAAAAAAAAAAAB2P//
    //v///8KAAAAAAAAAAAAAAAAAdf////7////CgAAAAAAAAAAAAAAAAHW////+////woAAAAAAAAAAAAA
    AAAB1f////v///8KAAAAAAAAAAAAAAAAAdT////7////CgAAAAAAAAAAAAAAAAs=
  </value>
</data>
Thanks.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

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 Dec 12, 2008 4:01 pm

Hi Luigi,

Ok, could you please send us a simple example project we can run "as-is" to reproduce the problem here?

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

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Mon Dec 15, 2008 8:32 am

narcis wrote:Hi Luigi,

Ok, could you please send us a simple example project we can run "as-is" to reproduce the problem here?
Ok, I will try to provide a sample application as soon as possible.

Thanks again.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Mon Dec 15, 2008 11:57 am

13046530 wrote:
Ok, I will try to provide a sample application as soon as possible.
Hi Narcís,
I just uploaded a test application (TestTChart.zip) onto your upload page.

To reproduce the problem, just change some property in the TChart inside the UCFrameChart control and save the project itself (or recompile the solution).

Thanks.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

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 Dec 15, 2008 2:45 pm

Hi Luigi,

Thanks for the example project. I could reproduce the issue here and added it (TF02013653) to the defect list to be investigated for next 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

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 Feb 16, 2009 10:58 am

Hi Luigi,

We have been investigating the issue here now and we don't think it is a bug. Openning UCFrameChart.resx in design viw, in the example project you sent and removing the row seriesMixed.Colors (of type ColorList), saving it and then reopening the UCFrameChart.cs solved the problem for us here. Could you please check if this solves the problem at your end?

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

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Thu Feb 26, 2009 10:21 am

narcis wrote:Hi Luigi,

We have been investigating the issue here now and we don't think it is a bug. Openning UCFrameChart.resx in design viw, in the example project you sent and removing the row seriesMixed.Colors (of type ColorList), saving it and then reopening the UCFrameChart.cs solved the problem for us here. Could you please check if this solves the problem at your end?

Thanks in advance.
First of all, I apologize for my late answer :roll: ...

Anyway: yes, removing the row in the resource file seems to solve the problem.. :)

Thanks again.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Thu Feb 26, 2009 10:56 am

13046530 wrote: Anyway: yes, removing the row in the resource file seems to solve the problem.. :)
Mmmmm... actually this solves the problem, but the entry inside the .resx file is recreated (I don't know exactly in which moment ... maybe when the frame is closed or when some modifications are made in the designer) and so it is necessary to remove the entry each time it is recreated :? ...
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Tue Mar 03, 2009 12:44 pm

13046530 wrote:
Mmmmm... actually this solves the problem, but the entry inside the .resx file is recreated (I don't know exactly in which moment ... maybe when the frame is closed or when some modifications are made in the designer) and so it is necessary to remove the entry each time it is recreated :? ...
I investigated a bit and the the entry in the resx seems to be recreated when a control (e.g. a button or a label) is added on the frame and once the project is recompiled...

It is possible to avoid design-time serialization of seriesMixed.Colors property into the .resx file and set it at run-time from the code ?

Thanks.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

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 Mar 04, 2009 11:15 am

Hi Luigi,

No, I'm afraid this is not possible.
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

Luigi S.
Newbie
Newbie
Posts: 25
Joined: Tue Aug 21, 2007 12:00 am

Post by Luigi S. » Wed Mar 04, 2009 12:07 pm

narcis wrote:Hi Luigi,

No, I'm afraid this is not possible.
OK, I take it all back :(.... But do you think the serialization problem could be fixed in a future release of TeeChart ?

Thanks.
Luigi S.
(using TeeChart for .NET ver. 3.5.3330.21113 with Microsoft Visual Studio 2005 SP1)

Post Reply