i am trying to get drag and drop working in xcode 3.1.4 on osx/leopard. any pointers or hints or maybe even example code? i cannot find anything out there and it is really disappointing. i want to have the interface respond if files are dragged on the main window.
+2
A:
As you didn't provide enough details I assume you are working in Xcode using the Cocoa framework.
To register a window or view as a dragging destination, use the registerForDraggedTypes: method of NSWindow or NSView.
You can find further details in the Getting Started with Drag and Drop Programming guide on developer.apple.com
weichsel
2010-01-15 17:08:13
thanks! this is a very good answer, since this also applicable for mac osx leopard. i could only find snow leopard examples and they are fundamentally different!
z3cko
2010-01-16 08:55:36