Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) cut (Read 12415 times)
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #30 - Oct 21st, 2008 at 9:26am
Print Post  
Hi,

In LoadFrom() method I am using..

Variables = context.LoadObject() as VariableCollection;

In SaveTo() method i am using..

context.SaveObject(Variables as IPersists);


like this.. at the time of pasting the LoadFrom() calling after that the after loading context.LoadObect().. the variables goes to null..

Actually the variable is collection type.. so i type cast as context.LoadObject() as VariableCollection;

so how can i rectify that one..
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #31 - Oct 21st, 2008 at 10:14am
Print Post  
Hi,

Try the SaveTag and LoadTag methods. They should work with any [Serializable] objects, while SaveObject and LoadObject will require you to implement the IPersists interface.

I hope that helps, 
Stoyan
  
Back to top
 
IP Logged
 
balajigcs
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 32
Joined: Aug 18th, 2008
Re: cut
Reply #32 - Oct 21st, 2008 at 12:07pm
Print Post  
ok thanks Stoyan.. now its working..
  

Thanks & Regards,&&&&Balaji
Back to top
 
IP Logged
 
Dexter
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 62
Joined: Jun 25th, 2009
Re: cut
Reply #33 - Jul 20th, 2009 at 10:34am
Print Post  
Hi there,

the copy/paste sequence work for shape nodes and so on. But I have a custom shape node composed by several shapes attached to one and other.
When the paste node event is called in the event args I have shape node not my custom type.

How can I get my type and not shape node?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: cut
Reply #34 - Jul 20th, 2009 at 12:25pm
Print Post  
Hi,

You must implement binary serialization to enable clipboard support for your custom type. The IconNodes sample project shows how to do that. Additionally, you must add a copy constructor to your type.

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