Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tag object on copy (Read 1737 times)
bogdan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 7th, 2006
Tag object on copy
Dec 7th, 2006 at 10:49am
Print Post  
Hello,

I am trying to copy/paste boxes but the object stored in the Tag property is not transmitted with this operations. Is there a way to preserve the Tag object?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tag object on copy
Reply #1 - Dec 7th, 2006 at 11:09am
Print Post  
Hi,

Add the [Serializable] attribute to your tag class declaration and copy/paste should work fine.

Stoyan
  
Back to top
 
IP Logged
 
bogdan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 7th, 2006
Re: Tag object on copy
Reply #2 - Dec 8th, 2006 at 6:42am
Print Post  
I did that and now I get an exception:

Type 'MindFusion.FlowChartX.Box' in Assembly 'FlowChart.NET, Version=4.2.1.26908, Culture=neutral, PublicKeyToken=a0d18338041985ba' is not marked as serializable.

I think that happens because I use objects of type Box in the class stored in the Tag property. Do you have some other suggestion about this?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tag object on copy
Reply #3 - Dec 8th, 2006 at 7:06am
Print Post  
Try how that will work with the [NonSerialized] attribute added before the box field in the Tag class.

If you still need to identify the box after copy/paste, you will need to implement the ISerializable interface and write some identifier, e.g. the box.ZIndex instead of the box itself.

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