Skip to content

Some fixes and cleanup to the Cocoa file drop code

Sean McBride requested to merge seanm/vtk:CocoaDropImprovements into master
  • replaced deprecated NSURLPboardType with newer name, and support it on older SDKs with a #define. Fixes dashboard compiler warnings.
  • override the other NSView designated initializer, initWithCoder:, to also register for drop events. Without this, if the view was created in a xib (like in the SimpleCocoaVTK example), drops could not be received.
  • accept only drops of file URLs and not other URLs (ex http).
  • don't exclude drags that start in the same application
  • return YES from performDragOperation: if the drop was successful.
  • added more temp variables, for easier introspection in debugger
  • added some additional comments.

Merge request reports