I have an application which uses (derived classes of) GoIconicNodes on a GoView, connected by GoLabeledLinks. Within this application, I am able to copy/paste without problems.
Well, that should work. If you try it with two different instances of Demo1, it does work. So I wonder what’s different about the links in your application.
I have never used trace listeners. What do I need to do to obtain any trace listener messages during PasteFromClipboard()?
The Debug Output window in Visual Studio is a trace listener. You can also implement your own – read about them in the Microsoft .NET documentation.
Well, after some more debugging, it appears that the problem was from the obfuscation we had done to our executable.
Well, now I am now able to reproduce this with the unobfuscated version so it is not obfuscation. The only message I get in the Output panel during PasteFromClipboard is:
Check out the topic: http://www.nwoods.com/forum/forum_posts.asp?TID=1394
Sorry for the delayed response. I was on vacation last week.
I finally figured out my problem, but I’m not sure how it was related to that thread you posted since I didn’t have any GoView references or other non-serializable controls within the GoIconicNode or GoLabeledLink derived classes I was copying/pasting.
Turns out my problem was that I was using 2 different versions of my application, and one of the versions had a couple of extra properties on one of the GoIconicNode derived classes. This was the version I was pasting into, so when it tried to deserialize those properties from the clipboard it was getting the SerializationException.
I found the problem by turning on Visual Studio / Debug / Exceptions / Break when an exception is Thrown for System.Runtime.Serialization.SerializationException. This caused a break at the correct place so that I could see the property that caused the problem.
Thanks for trying to help.