Drag and Drop in VisualWorks Smalltalk

256 Views Asked by At

How to detect that the user has drag-and-dropped a link from a web browser onto a VW window or widget (in OS X or in general on any OS)? The documentation mentions that only List widgets can be the source of drag events, but there has to be a way also for external objects being dropped... right?

1

There are 1 best solutions below

0
On

on os x it's not so simple as you have to register the pasteboard types with your NSView and then implement the NSDraggingDestination protocol in your view. see https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html for details. That's all not really easy to integrate with visualworks though as the whole window only has one nsview. You could extent that class in a bundle, but it's not exactly easy to do.

On windows you could do the same with COM, but that's also not obvious and out of the box i think.