i'm having difficulty with the clipboard. i'm pulling off text and filedrops okay, but not objects that i'm placing on it myself. i placed an onbject of type 'NodeInfo' on the clipboard with this peice of code:
NodeInfo myNodeInfo = (nodeInfo)myNodes;
Console.WriteLine(myNodeInfo == null);
Clipboard.SetDataObject(myNodeInfo);
notice the writeline, i'll come back to that. the code i'm writing to paste things from the clipboard is shaping up like this:
if(myIDataObject.GetDataPresent("Statex.nodeInfo")){
nodeInfo temp = (nodeInfo)myIDataObject.GetData("Statex.nodeInfo");
Console.WriteLine(temp == null);
}
in the console i'm getting the output:
False
True
this means that the NodeInfo object wasn't null when it went onto the clipboard, but was when it came off.
any ideas?
____________________________________________________
If you like a post, show you care by giving it a <censored>.
NodeInfo myNodeInfo = (nodeInfo)myNodes;
Console.WriteLine(myNodeInfo == null);
Clipboard.SetDataObject(myNodeInfo);
notice the writeline, i'll come back to that. the code i'm writing to paste things from the clipboard is shaping up like this:
if(myIDataObject.GetDataPresent("Statex.nodeInfo")){
nodeInfo temp = (nodeInfo)myIDataObject.GetData("Statex.nodeInfo");
Console.WriteLine(temp == null);
}
in the console i'm getting the output:
False
True
this means that the NodeInfo object wasn't null when it went onto the clipboard, but was when it came off.
any ideas?
____________________________________________________
If you like a post, show you care by giving it a <censored>.