We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Customized symbolmodel causes diagram.controller.paste() to fail.

Hello, I''m using a CustomSymbol model which adds a couple of properties to the standard model. This have been working nice till now when I started to implement the copy & paste functionality in my application. The diagram.Controller.Paste() method failes on line 1864 when he tries to read back the stored NodeCollection from the clipboard. ClipboardNodeCollection clipboardNodes = (ClipboardNodeCollection) clipboardData.GetData(typeof(ClipboardNodeCollection)); My feeling in that there is a type mismatch somewhere causing this to fail. My symbol model is now of type CustomSymbolModel and it seems to fail when the clipboardData.GetData makes a type conversion to ClipboardNodeCollection. So what should I do to get copy/paste to work together with a CustomSymbolModel? I''m using version 3.2.0.0 of the symfusion diagram component Best Regards Tommy Norman

11 Replies

AD Administrator Syncfusion Team April 18, 2005 08:40 PM UTC

Tommy, The event delegates, event arguments and enumerations used by the Essential Diagram collection classes have undergone a restructuring for the 3.2 release. Essentially, all the nested delegates, event args and enums used for implementing collection class events have been replaced by top-level types. It is very likely to be this change that is causing your derived implementation to break. I hope this helps you figure out the problem. If not, please try to send us a small sample that shows the condition, and I will take a look at it. Regards, Prakash Surendra Syncfusion Inc.,


TN Tommy Norman April 19, 2005 03:39 PM UTC

Here is a sample based on the Diagram builder sample code, where we added a reference to our customised symbol model, and we load our own symbol pallete for switchgear symbols. In this example you can easily reproduce the strange behaviour by trying to copy and paste one of our symbols. E.g. set a breakpoint in the paste method of the controller class. ClipboardNodeCollection clipboardNodes = (ClipboardNodeCollection) clipboardData.GetData(typeof(ClipboardNodeCollection)); //clipboardNodes is null?! Regards Tommy DiagramBuilderSample_6777.zip


AD Administrator Syncfusion Team April 22, 2005 03:16 PM UTC

Hi Tommy, I ran your sample with the codebase that we are currently testing for the final release version of Essential Diagram 3.2. Copy/paste of your ''Switchgear'' symbols works perfectly without any problems. We made several fixes to the diagram code following the 3.2 RC, and it looks like this issue has been fixed as well. The release version of Essential Studio 3.2 should be available within the next few days. Please wait till that image is available and let us know if you encounter the problem in that version. Thanks, Prakash Surendra Syncfusion Inc.,


RD Richard Deverson May 2, 2005 01:41 PM UTC

Hi Prakash, Tommy is unfortunately leaving us shortly, and I am attempting to fill his shoes. I have installed 3.2.1.0 (after deinstalling and cleaning the gac of the old version), but I still have this problem with copy/paste, both in our application, and in the demo application we sent previously. When I copy one of our symbols, the line: ClipboardNodeCollection clipboardNodes = (ClipboardNodeCollection) clipboardData.GetData(typeof(ClipboardNodeCollection)); in the Controller class returns null. When I copy a "standard" symbol, it works fine. Any ideas? Thanks Richard Deverson >Hi Tommy, > >I ran your sample with the codebase that we are currently testing for the final release version of Essential Diagram 3.2. Copy/paste of your ''Switchgear'' symbols works perfectly without any problems. We made several fixes to the diagram code following the 3.2 RC, and it looks like this issue has been fixed as well. The release version of Essential Studio 3.2 should be available within the next few days. Please wait till that image is available and let us know if you encounter the problem in that version. > >Thanks, >Prakash Surendra >Syncfusion Inc.,


AD Administrator Syncfusion Team May 4, 2005 04:31 PM UTC

Hi Richard, I am perplexed by this issue. I retested the version of the DiagramBuilder sample that Tommy sent over with the download version of 3.2.1.0 and copy/paste works of your custom SwitchGear symbols works perfectly. I tried various configurations of the Syncfusion libraries such as the Pre-built Release, Debug, Release version etc., and it works as expected in all cases. I am surprised that your application and the DiagramBuilder sample in your system are able to load your custom palette, but fail during a copy/paste operation. If there is a version conflict in the Diagram libraries, then the palette should fail to load as well. If possible, please try to build a debug version of the Syncfusion libraries using the Essential Studio AssemblyManager, rebuild the debug version of the DiagramBuilder sample to link to these libraries, and try a copy/paste operation with exceptions turned on in VS.NET. See if this reveals any information. Regards, Prakash Surendra Syncfusion Inc.,


TN Tommy Norman May 11, 2005 01:51 PM UTC

Hi Prakash, I have debugged the problem a bit more and it only occures on Windows 2000, on XP it works ok. Our tools have to support both plattforms. I have seen in the forums that there has been similar clipboard problems with the grid components and windows 2000. Any ideas? Regards Tommy


AD Administrator Syncfusion Team May 12, 2005 09:30 PM UTC

Hi Tommy, That could explain it. So far I''ve run all tests of your sample on machines running Windows XP. I will test your symbol palette on a Windows 2000 system and let you know. Thanks, Prakash Surendra Syncfusion Inc.,


RD Richard Deverson May 20, 2005 12:26 PM UTC

Hi Prakesh, Have you had a chance to test this on Windows 2000 yet? Regards Richard


AD Administrator Syncfusion Team May 24, 2005 12:03 AM UTC

Hi Richard, I have not had a chance to look into the issue as yet. Sorry about this, but I will definitely test the scenario out and update the post within a day or two. Regards, Prakash Surendra Syncfusion Inc.,


AD Administrator Syncfusion Team March 21, 2006 08:18 AM UTC

Hello, I am revisiting this problem again with version 3.3.0.0 The problem still exists, i.e. on Windows 2000 the ClipboardNodeCollection is null within my CustomController overridden paste method. Any suggestions? Richard Deverson >Hi Richard, > >I have not had a chance to look into the issue as yet. Sorry about this, but I will definitely test the scenario out and update the post within a day or two. > >Regards, >Prakash Surendra >Syncfusion Inc.,


AD Administrator Syncfusion Team March 21, 2006 12:31 PM UTC

Hi Richard, If possible could you please try downloading the latest build V4.1.0.62 for the Essential Studio.? I have tested the issue that you have raised here with this version and the Copy/paste of your ''''Switchgear'''' symbols works as expected. You can get the download instructions for the released version V4.1.0.62 from the following link - http://www.syncfusion.com/support/forums/message.aspx?MessageID=41784. Please try with this latest version and let us know if you run into any problem further. We will be glad to assist you. Thanks for your continued support to Syncfusion. Regards, Meera.

Loader.
Live Chat Icon For mobile
Up arrow icon