We have recently upgraded from version 2.4.1.1 to 2.6.2.2 and have encountered a drag/drop problem when using the new version.
OK, I just tried a scenario with your three overrides when dragging from a TreeView, and everything works fine.
So DoExternalDrop is never called?
base.DoExternalDrag(evt); // also do standard behavior
GoObject over = PickObject(true, false, this.LastInput.DocPoint, true);
if (over is GraphNode) evt.Effect = DragDropEffects.None;
}
IDataObject data = evt.Data;
Object treenodeobj = data.GetData(typeof(TreeNode));
if (treenodeobj is TreeNode) {
TreeNode treenode = (TreeNode)treenodeobj;
GoObject tag = treenode.Tag as GoObject;
if (tag != null) {
return tag;
}
}
return base.GetExternalDragImage(evt);
}[/code]
So DoExternalDrop is never called?
OK, this is weird. Are you able to drag the Start, Stop, or Comment TreeView items to a GoView?
Ah, OK, everything works fine, if in the override of GetExternalDragImage we make a Copy() of the object, instead of re-using the same object each time.
Ah, OK, everything works fine, if in the override of GetExternalDragImage we make a Copy() of the object, instead of re-using the same object each time.
I’ll diff our sources to see if I can guess what the problem might be.
I just tested 2.4.1.2 and it works correctly.
Just tested 2.5.1.2 and it also works correctly. So far I only have the problem with 2.6.2.2.
One interesting side note: I didn’t use the 2.5.1 License Manager before testing (and I’ve never installed 2.5 before), but I noticed that I didn’t have the eval watermark on the GoView. So, after testing I opened the 2.5 License Manager and it said that I had a binary development license for Go (not eval). Does it automatically assume I am licensed for 2.5 because I am licensed for 2.6, without having to enter a specific 2.5 unlock code?
Tested 2.6.1.2 and it does not work.
Tested 2.5.2.2 and it does work.
Wow, thanks for trying all those different versions.
But if I recall correctly, it had the same behavior in 2.4.1 as in 2.6.2, so this might not be the most likely to be fruitful course of investigation.
I’d be happy to give you those sources. But I don’t see why that would change anything, since you said that whether or not there was an override didn’t change the behavior. Hmmm, well, that’s true for GetExternalDragImage. But not for DoExternalDrag, since you do call the base method when the override is defined.
They’re on the way…
I’d be happy to give you those sources. But I don’t see why that would change anything, since you said that whether or not there was an override didn’t change the behavior. Hmmm, well, that’s true for GetExternalDragImage. But not for DoExternalDrag, since you do call the base method when the override is defined.