The Finder can show an NSPathControl
at the bottom of its windows. If the user drags an item from that path control to the Dock's Trash icon, the item gets trashed accordingly.
I like to achieve the same in my program. However, I cannot figure out how to accomplish this because there is no draggingSession:endedAtPoint:operation:
as there are with other controls such as NSTableView
.
How do track a dragging session of NSPathControl
in order to learn that the item was dragged to the Trash so that I can delete it then? Or is there a way to have the deletion happen automatically?
(Of course, I've set the draggingSourceOperationMask
to NSDragOperationEvery
and dragging to the trash is possible - it's just that the dragged item then doesn't get deleted.)