Print Page | Close Window

DesignerControls empty after SaveStateToXMLString

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9873
Printed Date: 27 June 2024 at 11:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DesignerControls empty after SaveStateToXMLString
Posted By: markh
Subject: DesignerControls empty after SaveStateToXMLString
Date Posted: 12 March 2008 at 5:41pm
Hello
 
I am having an issue with SaveStateToXMLString. After I call this method, the DesignerControls list seems to get emptied. If I look at DesignerControls->Count before and after the call I can see it change from the correct number of elements to zero.
 
I have the SerializeDesignerControls option of StateOptions set to TRUE. This means that the first time I call SaveStateToXMLString the DesignerControls are saved correctly to the XML string. However, on the second call, the DesignerControls aren't saved, since the list has been deleted. This has the effect of giving me two different files on two subsequent calls to SaveStateToXMLString, the first with the DesignerControls and the second without, which is very odd. It also means that if I reload any file saved after the first call, the DesignerControls are not present in the file to be reloaded.
 
Any ideas?
 
Thanks
Mark



Replies:
Posted By: Oleg
Date Posted: 13 March 2008 at 10:51am
Hi,
yes, think its true. it doesn't save DeignerControls by default. Use DoPropExchange method instead.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: markh
Date Posted: 13 March 2008 at 1:25pm
Hello Oleg.
 
It does save the DesignerControls on the first call to SaveStateToXMLString. However, it then deletes the list so that any subsequent files saved do not contain the DesignerControls.
 
This can be seen by loading the resulting files into the Designer Studio. The first file saved, displays all of the controls in the Controls Pane. However, any later saved files have an empty Controls Pane.
 
This seems rather inconsistent behaviour and makes it rather difficult to use the XML format for saving/loading user toolbar customizations.
 
I'll try DoPropExchange and let you know the results.
 
Mark



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net