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. Image for the cookie policy date
close icon

Load/SaveDockState problems (with 4.3)

I am experiencing an issue with the Save/Load Dock state functionality of the Docking Manager.

We were using Syncfusion 4.2.0.37 before – and this worked perfectly. But now we have upgraded to 4.3.0.30 and it is not working at all. We are also using VS2005 and .NET 2.0

We are handling the persisting of dock states ourselves (specifically, our code looked like this)

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.SaveDockState (serializer, control1);
dockingManager.SaveDockState (serializer, control2);
dockingManager.SaveDockState (serializer, control3);
serializer.PersistNow ();
stream.Close ();

When we wanted to retrieve the state, we would do so like this:

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.LoadDockState (serializer, control1);
dockingManager.LoadDockState (serializer, control2);
dockingManager.LoadDockState (serializer, control3);
stream.Close ();

As I said – that was working up until today when we upgraded to 4.3. Now, all of those “LoadDockState ()” calls return true – but they place those controls in a very unstable state. Where if you try to move one even a pixel, it crashes the application.

I tried to re-create the issue in a separate application, and was unable. I did come across other samples where the code to save/load looks like this:

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.SaveDockState (serializer);
serializer.PersistNow ();
stream.Close ();

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.LoadDockState (serializer);
stream.Close ();

I was able to get this working perfectly in my sample application (the output state file was 9kb in size). But when I tried the approach in the main application – the file that is output was 1kb, in fact – it is actually about 737 bytes. When the “LoadDockState (serializer)” is called – it returns false.

I looked in the Release Notes for 4.3 and did see some changes to the Docking State stuff.

Have you seen anything like this? Or know why the output binary file would only be 1kb – it is as if the “SaveDockState (serializer);” call is saving out a blank dock state. But I don’t understand why it would not work here, but work in another application.

I will try to find a way to reproduce it in a smaller application tomorrow and will post it if I can. Any suggestions or ideas would be most welcome!

Jonathan

8 Replies

MA Malarvizhi Syncfusion Team November 16, 2006 04:16 AM UTC

Hi Jonathan,

Sorry for the inconvenience caused.
This is a known issue in 4.3.0.30.We have fixed the issue internally and our next release 4.4 will contain the bug fix.

Thanks for choosing Syncfusion products.

Regards,
Malarvizhi.


AD Administrator Syncfusion Team January 24, 2007 09:27 PM UTC

I get the same problem in 4.4 - not so much the crashing, but the SaveDockState always seems to save a small file and the LoadDockState always returns false.


MU Murugan Syncfusion Team January 24, 2007 10:47 PM UTC

Hi Mark,

I am afraid, we could not reproduce the issue here. Herewith I have attached the sample that I have used to check the issue here. Please have a look at the sample and let me know if I have missed anything.

TDM_Dockstate

Thanks,
Murugan P.S


AD Administrator Syncfusion Team January 25, 2007 06:11 PM UTC

Thanks Murugan.
I can't repro the issue in your example. But I'm still not sure why it's not workig in mine.
I thought it might have been the timing of when I'm Loading/Saving the dock state (eg: controls not completely constructed or something) - but even when I do it using some buttons the LoadDockState method always returns false.
I wonder if it might be a property I've set on the dockingManager or maybe it's the type of controls that I'm trying to dock (one is a TreeView).


MU Murugan Syncfusion Team January 25, 2007 07:02 PM UTC

Hi Marc,

Sorry for the inconvenience caused. We have tried to reproduce the issue here. But we could not reproduce the issue. Could you please send us the sample having the issue? This will help us to analyse the issue further. Before sending,
Please delete all files from IsolatedStorage

C:\Documents and Settings\loginname\Local Settings\Application Data\IsolatedStorage

and try to run the sample. Please let me know if it helps you.

Thanks,
Murugan P.S


AD Administrator Syncfusion Team January 25, 2007 10:40 PM UTC

Hi Murugan.
Thanks for the resply. I'll try and send a sample that reproduces the issue but it might be hard - I can't repro it in your code. It seems to work fine. It's just happening in my, rather large, application so I'm pretty sure it's something I'm doing that's messing it up. I'm just having a hard time figuring out what.
Mark


AD Administrator Syncfusion Team February 2, 2007 05:44 PM UTC

I think I figured out my issue with the DockingManager.
The controls being docked had their Name property set to "". It looks like the serialization of the dock state depends on the name to set some kind of key.


MU Murugan Syncfusion Team February 2, 2007 05:52 PM UTC

Hi Mark,

Thanks for your update.

You are correct. Serialization depends on the control name. Name has to be set for all docked controls.

Regards,
Murugan P.S

Loader.
Live Chat Icon For mobile
Up arrow icon