Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exception - Cut / Paste (Read 1993 times)
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Exception - Cut / Paste
Apr 26th, 2011 at 5:51pm
Print Post  
Hello,

my application crashes when using ctrl + x or
Code
Select All
bool cut = dgDiagram.CutToClipboard(false); 

It causes an Exception.

Now i would like to make a quick solution to prevent the user from using ctrl + x and then implement a function to cut and copy the diagramitems.

1. Quick solution: Prevent user from ctrl +x:
I used the event KeyUp to handle it but the exceptions is coming first.

2. What are the steps to implement ctrl + x correct. I read in the helpfile about implementing ICloneable and the method Clone:
Code
Select All
public object Clone()
{
   // do something
   return new myobject;
}
 


I still get an NullpointerException even with implementing ICloneable.

Thx for your help.
Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Exception - Cut / Paste
Reply #1 - Apr 26th, 2011 at 6:19pm
Print Post  
Hi,

You should override the "DiagramItem Clone(bool clipboard)" method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Re: Exception - Cut / Paste
Reply #2 - Apr 27th, 2011 at 12:12pm
Print Post  
Works, thx very much.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint