Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Extra field and export to xml (Read 2065 times)
ragnarok00
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Nov 14th, 2008
Extra field and export to xml
Nov 14th, 2008 at 7:51am
Print Post  
Hi,

What should I do if I want to add extra field into shape node?
i.e. can I have 2 values assigned to one shapnode?

I know that there is an API to export the diagram to XML. I would like to know if I could expand the use of it? Like export the new values too so that I can obtained it from the xml creating.

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Extra field and export to xml
Reply #1 - Nov 14th, 2008 at 8:25am
Print Post  
Hi,

You could add extra fields either by deriving from ShapeNode, or by defining the fields in a separate class and using its objects as ShapeNode.Tag values.

If you derive from ShapeNode, you can override its saveToXml and loadFromXml methods to add code for serialization of the extra fields. If using tags, handle the serializeTag and deserializeTag events to do that.

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