views:

111

answers:

1

Hi Everyone:

By default (it seems), IKImageBrowserView enables drag and drop to locations in the Finder. I would like to turn off this behavior but am unsure of how to do so. I was thinking that perhaps implementing the NSDraggingDestination protocol and overriding it could solve this, but so far it hasn't worked for me.

Thanks for any help!

+1  A: 

If you want to customize IKImageBrowserView's drag and drop behavior, you can implement the - (NSUInteger) imageBrowser:(IKImageBrowserView *) aBrowser writeItemsAtIndexes:(NSIndexSet *) itemIndexes toPasteboard:(NSPasteboard *)pasteboard method in your browser's data source object. That will let you define what types and data you want to put on the pasteboard when doing a drag. If you want to disable dragging entirely, you should be able to just return 0 (the number of items you want to be dragged).

Brian Webster