views:

245

answers:

1

Hi,

I have an NSWindow containing and NSImageView. I want that the user can drag 'n drop a .app file (application) into the NSImageView, and my application see which file is dropped. Is there a way to do this (okay, I'm sure there is a way to do this -_- but which one :p )?

So much like iWeb does it with image files.

A tutorial would be nice (english or dutch).

Thanks in advance.

+4  A: 
  1. Subclass NSImageView
  2. Implement NSDraggingDestination protocol
  3. Register an instance of your subclass to accept your defined PBoardType

Here is a well written tutorial (it's a bit old, but maybe useful): http://www.cocoadevcentral.com/articles/000056.php

weichsel