It's not clear to me how to do drag&drop to Finder with
dragPromisedFilesOfTypes:fromRect:source:slideBack:event: (NSCollectionView)
I call the above method from mouseDown:, bu开发者_如何学Got
(NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
isn't called at all.
Any ideas how this should work (MacOSX 10.6, project compiled for 10.5, 64bit)?
Thanks!
I had missed one method implementation: (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
. This solved the issue.
Have you already looked at the Drag and Drop Programming Topics? This whole book is on drag & drop, and it has a section specifically on file promises.
http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/Tasks/DraggingFiles.html#//apple_ref/doc/uid/20001288-102943
精彩评论