DnD progress report

Cees De Groot cdegroot at gmail.com
Fri Sep 30 11:46:22 UTC 2005


Source widget:

handleMouseEventInList: aMouseEvent
	aMouseEvent dragging
		ifTrue: [
			| data src result |
			selectedFile ifNil: [^self].
			data := WxFileDataObject new addFile: selectedFile qualifiedReference.
			src := WxDropSource data: data.
			result := src doDragDrop.
		]
		ifFalse: [
			aMouseEvent skip]

Target widget:

initialize
	[...]
	self setDropTarget: (DGVMainTreeDropTarget new tree: self).

DGVMainTreeDropTarget is a subclass of WxFileDropTarget.

This results in:
- drags can be started from the widget, but the whole application
shows the 'forbidden' icon. I can drag onto a Windows file explorer
window, however;
- drags of a Windows file show that the #setDropTarget: works ok,
because files can be dropped on the widget that set the drop target
but nowhere else (and the drop target's callback is called back).

Any idea what could be wrong?



More information about the Wxsqueak mailing list