Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CompositeNode - SavetoString and LoadFromFile (Read 1179 times)
AtlantaCoder
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Jan 8th, 2013
CompositeNode - SavetoString and LoadFromFile
Jan 8th, 2013 at 3:03am
Print Post  
I have a demo application where i'm using composite node.

1)public class Base: CompositeNode
2)public class DerivedOne: Base
3)public class DerivedChild1: DerivedOne
4)public class DerivedChild2: DerivedOne

I have registered and defined public constructor it fails during loading from file.

I needs to know if i'm missing something ctor initialization?
Any sample with nested hierarchy would be of great help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CompositeNode - SavetoString and LoadFromFile
Reply #1 - Jan 8th, 2013 at 6:56am
Print Post  
In what manner does it fail? Verify the following:

- RegisterItemClass should be called for each custom class before calling serialization methods
- when loading, the diagram looks for public no-arg () or (Diagram) constructors in the class via reflection
- check if fields serialized from custom SaveTo and LoadFrom methods are listed in the same order and the read/write methods used for each field have matching types.

See the Scripting sample project and EmployeeNode.cs in the C#/Demo project.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint