customize drag image on NSTableView when using pasteboardWriterForRow

Hi!

We wanted to customize a drag image when dragging NSTableView items, we are also using pasteboardWriterForRow to support drag items to desktop. However, using that API will cause dragImageForRows:event:dragImageOffset not getting called.


May I ask is there a way to provide a cuztomized drag image while using pasteboardWriterForRow API at the same time?

How is Apple Mail achiving both things at the same time?


Thanks a lot! Would appreciate any insights 🙂

Replies

Hope that will be a first step.


this post describe a similar problem and proposes some direction:

h ttps://www.mail-archive.com/cocoa-dev@lists.apple.com/msg108721.html


Because dragImage is the old (and likely soon to be deprecated), single image

style drag setup and the pasteboardWriter version is the modern multi-image

drag set up. Ever notice how when you drag a file around in the Finder the

drag image will morph as the drag moves between windows with different view

styles etc? Or how the drag images change positions relative to the mouse as

you drag multiple files around. That is the multi-image drag setup. Single

image drags can’t do that.


Tell if you succeeded at the end.

Good luck

Thanks for taking time to answer that!

I see. We actually did not like the default animation while dragging, it does looks nice but will negatively impacts the performance when dragging a lot of items (1000+ or so)

We will see what we can do if the APIs are not supported.

Thanks again for the help! 🙂

Wish you good.


Don't forget to report when it works and then close the thread.