I have an NSArrayController that I'm using to provide data to an IKImageBrowserView. I want to support drag and drop from the IKImageBrowserView to other applications. Here's the relevant method from my code:
- (NSUInteger) imageBrowser:(IKImageBrowserView *) aBrowser writeItemsAtIndexes:(NSIndexSet *) itemIndexes toPasteboard:(NSPasteboard *)pasteboard{
NSArray *items = [[resultsArrayController arrangedObjects] objectsAtIndexes:itemIndexes];
if(![pasteboard writeObjects:items]){
return 0;
}
return [items count];
}
My app is new so I'm targeting 10.6+ and according to the documentation, "On Mac OS X v10.6 and later, use writeObjects: to write URLs directly to the pasteboard instead."
I've verified that the objects that I am attempting to write are indeed NSURL objects, so I'm not sure where the process is breaking down or how to further troubleshoot the problem. Thanks in advance for any help.