Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic serialization and loadfromString issue (Read 2263 times)
Gofj
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 12th, 2009
serialization and loadfromString issue
Apr 12th, 2010 at 7:50pm
Print Post  
I'm using the evaluation version and upon deserialization of a diagram with custom nodes, nothing is displayed.

I have created my own node class derived from ShapeNode. I have overriden Loadfromxml and SaveToXml and I have registered the new node type. In fact if i replace my open/save code with calls to LoadFromXml() and SaveToXml() everything works fine.

However, if i replace those calls with LoadFromString() and SaveToString() nothing is displayed. The LoadFromXml() method in my node class is called. After the LoadFromString() is called, the node collection in the diagram does contain my nodes.

I should also point out i have provided my own bitmap image from the node. It is converted to base64string during the node's savetoxml and converted from a base64string duringthe node's loadfromxml.



Any thoughts?

Thanks,
John
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: serialization and loadfromString issue
Reply #1 - Apr 12th, 2010 at 8:54pm
Print Post  
LoadFromString() and LoadFromXml(file) both end up calling LoadFromXml(XmlDocument). Could you enable the "break when thrown" option for CLR exceptions in the Debug/Exceptions window to see if there isn't an exception happenning at some point?

Stoyan
  
Back to top
 
IP Logged
 
Gofj
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 12th, 2009
Re: serialization and loadfromString issue
Reply #2 - Apr 12th, 2010 at 9:15pm
Print Post  
Stoyan thanks,

I enabled the 'break when thrown' for CLR exceptions but none were thrown.


FYI: I am using VS 2010 release candidate. I haven't seen any problems with your control.


Thanks again,
John
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: serialization and loadfromString issue
Reply #3 - Apr 12th, 2010 at 9:28pm
Print Post  
Could you check if the Visible property of the nodes you can see in the collection is enabled? What's the base class of the custom nodes?
  
Back to top
 
IP Logged
 
Gofj
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Feb 12th, 2009
Re: serialization and loadfromString issue
Reply #4 - Apr 12th, 2010 at 11:05pm
Print Post  
Stoyan,

I found MY problem. I must be losing my mind! I created a new diagram but didn't set it as the view's diagram.

Thanks so much for the prompt response,

John
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint