Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Copy and Paste Issue (Read 2184 times)
dolfandon
Junior Member
**
Offline



Posts: 51
Location: Northern Virginia
Joined: Mar 12th, 2009
Copy and Paste Issue
Jan 7th, 2011 at 4:58pm
Print Post  
I am having an issue with copy and paste. If I use the copy selection from the diagram and then delete the original object, when I try to paste the copied object I get a null pointer exception. When I look at the debugger sure enough, the children of the container node is empty after I delete the original item from the diagram.

Code
Select All
                copyData = currentDiagram.CopySelection(true);
 



And then I read that data on paste.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Copy and Paste Issue
Reply #1 - Jan 7th, 2011 at 7:06pm
Print Post  
Copy -> Delete -> Paste worked for me both with containers and child nodes. Could you elaborate on what kind of objects are you copying and in what context?

Stoyan
  
Back to top
 
IP Logged
 
dolfandon
Junior Member
**
Offline



Posts: 51
Location: Northern Virginia
Joined: Mar 12th, 2009
Re: Copy and Paste Issue
Reply #2 - Jan 13th, 2011 at 4:48pm
Print Post  
We have a Container node that contains a shape node and a text block. What I noticed is that the container node is OK but the children are missing if I delete the original object.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Copy and Paste Issue
Reply #3 - Jan 14th, 2011 at 8:18am
Print Post  
That works for me. Are you doing anything special when the container is deleted, e.g. from a NodeDeleted handler? Could you also try the CopyToClipboard and PasteFromClipboard methods? they should not depend on the presence of the original items at all.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint