Re: Maybe a complex question on NSTableView and Drag & Drop...
Re: Maybe a complex question on NSTableView and Drag & Drop...
- Subject: Re: Maybe a complex question on NSTableView and Drag & Drop...
- From: Brian Webster <email@hidden>
- Date: Fri, 06 Jul 2001 16:43:29 -0500
on 7/6/01 4:14 PM, email@hidden at
email@hidden wrote:
>
When you want to perform Drag & Drop with a NSTableView, the methods in
>
NSTableView.h are used.
>
>
But how do you know that the final destination of a drag from a
>
NSTableView is the Trash in the Dock ?
>
>
It seems not to be possible.
It is possible, it's just not directly supported with the default
NSTableView dragging functionality. If you have a drag source, you can test
to see whether a drag ended in the trash by implementing the
draggedImage:endedAt:operation: method. If the value passed into the
operation argument is NSDragOperationDelete, that means it was dropped on
the trash. In your case, you'll have to subclass NSTableView and implement
this method in your subclass. I'm not sure if NSTableView implements it, so
you might want to try calling super's implementation in your implementation,
as it might need to take care of some visual stuff.
>
Is it officialy supported to specify -1 as the drop row with a
>
NSTableViewDropOn to get the whole tableview selected for a drop ?
I'm pretty sure that this is correct, since it is consistent with the values
passed into the data source methods for such a drop. The bad visual
scrolling stuff is probably just a bug, but a word from someone at Apple
would be best on this.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster/