dragging from a NSTableView
dragging from a NSTableView
- Subject: dragging from a NSTableView
- From: Tobias Lidskog <email@hidden>
- Date: Wed, 1 Aug 2001 15:10:53 +0200
Hi,
I'm trying to implement dragging from a NSTableView but can't get it to
work. Dragging to the view works just fine, validateDrop: and
acceptDrop: are called. However my implementation of tableView:
writeItems: toPasteboard: is never called when I'm trying to drag rows
from the NSTableView. The documentation states that this method will be
called "after it has been determined that a drag should begin". Well, it
seems like someone is determined to never let the drag begin...
What do I need to do to allow the drag to start? I've simplified my
table to just have one column filled with NSStrings, but still can't get
it to work. What's even stranger is that if I change the NSTableView
into a NSOutlineView (and change the NSTableDataSource methods to the
corresponding NSOutlineViewDataSource methods) dragging from the view
works. What am I missing, is it a bug or a feature?
I've put two very simple samples (~ 30 kB each) on my iDisk, if someone
would like to take a look. One contains the project with the
NSTableView, and the other is the project with the NSOutlineView.
<
http://homepage.mac.com/tobiaslidskog/>
/Tobias