I looked high and low for information on how to handle drag n drop to the dock in OSX. The drag n drop documentation (http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html#//apple_ref/doc/uid/10000069) I found all deal with dragging from view to view. If anyone can point me to some code samples, that would be excellent.
I'm writing my app using the PyObjC bride, but Cocoa examples would be equally welcome :-)
Well, looks like I asked too soon. Here is a great tutorial that shows how one does it:
http://recurser.com/articles/2007/04/13/cocoa-drag-to-dock-to-open/
Basically, just set your controller to be the delegate of NSApplication and implement the openFile method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With