We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Serialization problem with fonts

Thread ID:

Created:

Updated:

Platform:

Replies:

53489 Dec 14,2006 04:43 AM Mar 26,2007 08:09 AM General Discussion 9
loading
Tags: General Discussion
Sandro
Asked On December 14, 2006 04:43 AM

I have a problem serializing an object that has a few properties wich of one is of type System.Drawing.Font.
The problem is the following:

In certain points of my application, i serialize the object using the AppStateSerializer like this:

AppStateSerializer aser = new AppStateSerializer(SerializeMode.XMLFile, "MyFolder\\Preferences");
aser.SerializeObject("MyPreferences", myObjectIstance);
aser.PersistNow();

When I want restore the serialized information, I use the AppStateSerializer too:

MyObject myObjectIstance = new MyObject();
AppStateSerializer aser = new AppStateSerializer(SerializeMode.XMLFile, "MyFolder\\Preferences");
myObjectIstance = aser.DeserializeObject(("MyPreferences") as MyObject;

the problem is that myObjectIstance is always null!!

I have tryed to comment the property with type System.Drawing.Font and all works correctly!!

Is this a bug? Am I mistaking something?

Regards, Sandro

Sandro
Replied On January 8, 2007 09:42 AM

The problem is not clear? Have I to explain the problem better?

Regards, Sandro

Murugan [Syncfusion]
Replied On January 23, 2007 06:33 PM

Hi Sandro,

We are really sorry for the delay in responding. We have tested the mentioned issue. We could not reproduce the issue here. Could you please provide us a sample having the issue? This will help us to resolve the issue soon.

Thanks for choosing Syncfusion products.

Regards,
Murugan P.S

Sandro
Replied On January 24, 2007 05:18 AM

I have created a little sample that reproduce the error.

If you run the application attached, in the form that appears choose a font with the font dialog. Then click "serialize it" and next "Load from serialized". You can see that the first class (including a property with type System.Drawing.Font) will be null and the second class (the same as the first but without the property with type System.Drawing.Font) will be correctly loaded.

I wish this example will be clear.

Best regards, Sandro

SerializingFontSample.zip

Murugan [Syncfusion]
Replied On January 31, 2007 06:29 PM

Hi Sandro,

Thanks for your sample.

We have tested the issue using v4.4. We could not reproduce the issue here. Could you please send us your Essential Studio version details. It will be very useful to analyse the issue further.

Herewith I have attachd the video file that shows my testing process. Please have a look at this and let me know if i missed anything.

SerializedObject

Thanks,
Murugan P.S

Sandro
Replied On February 6, 2007 06:10 AM

I have tested the sample application on the machines of my collegues, and I saw that the application works on machine with English operative system and not on Italian operative systems.
This is a problem because my application will be distribuited worldwide, and now I don't know if works on all operative systems.

Can you tell me if there is a way to resolve this problem?

Regards, Sandro

Sandro
Replied On February 19, 2007 03:53 AM

Dear Murugan,

since I'm not receiving any feedback to my support request, I assume that this problem is caused by a bug in your component.
Do you have any plan to release a bug-fix for it?
I'm waiting for an answer as soon as possible.

Best Regards, Sandro.

Murugan [Syncfusion]
Replied On February 19, 2007 07:00 PM

Hi Sandro,

We are really sorry for the delay in responding. We are looking into the issue. We will update the details on Wednesday.

Thank you for your patience.

Regards,
Murugan P.S

Sandro
Replied On March 7, 2007 03:41 AM

Today = Wednesday + 14 ...

BS, Sandro

Venugopal M [Syncfusion]
Replied On March 26, 2007 08:09 AM

Hi Sandro,

We are very regret for the delay in response. We are able to see the issue and forwarded to development team. But you can resolve this problem using BinaryFile format instead of XMLFile until issue getting fixed. In the attached sample I have persist the object state in binary file and de-serialized. Its working fine in Italian operative system also.

For Instance:

AppStateSerializer aser1 = new AppStateSerializer(SerializeMode.BinaryFile, "PreferencesWithFont");

(Instead of)

AppStateSerializer aser1 = new AppStateSerializer(SerializeMode.XMLFile, "PreferencesWithFont");

You can get sample from here :
http://websamples.syncfusion.com/samples/Tools.Windows/FontSerializing/main.htm

Could you please open a direct-trac incident with subject line as forum id to proceed with this bug.

Thank you for interest in Syncfusion Product.

Thanks ,
Venugopal M.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;