Page 1 of 2
Serialization problems at design-time
Posted: Fri Dec 12, 2008 1:58 pm
by 13046530
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.
Posted: Fri Dec 12, 2008 2:49 pm
by 14045263
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.
Posted: Fri Dec 12, 2008 2:51 pm
by narcis
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.
Posted: Fri Dec 12, 2008 3:16 pm
by 13046530
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
, but I don't actually need it
!!!).
For now this solution seems to work ...
Thanks again
Posted: Fri Dec 12, 2008 3:58 pm
by 13046530
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.
Posted: Fri Dec 12, 2008 4:01 pm
by narcis
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.
Posted: Mon Dec 15, 2008 8:32 am
by 13046530
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.
Posted: Mon Dec 15, 2008 11:57 am
by 13046530
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.
Posted: Mon Dec 15, 2008 2:45 pm
by narcis
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.
Posted: Mon Feb 16, 2009 10:58 am
by narcis
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.
Posted: Thu Feb 26, 2009 10:21 am
by 13046530
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
...
Anyway: yes, removing the row in the resource file seems to solve the problem..
Thanks again.
Posted: Thu Feb 26, 2009 10:56 am
by 13046530
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
...
Posted: Tue Mar 03, 2009 12:44 pm
by 13046530
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.
Posted: Wed Mar 04, 2009 11:15 am
by narcis
Hi Luigi,
No, I'm afraid this is not possible.
Posted: Wed Mar 04, 2009 12:07 pm
by 13046530
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.