Re: NSTableView and drag and drop
Re: NSTableView and drag and drop
- Subject: Re: NSTableView and drag and drop
- From: Graham Cox <email@hidden>
- Date: Sun, 12 Oct 2008 15:42:42 +1100
On 12 Oct 2008, at 3:33 pm, Chris Idou wrote:
The thing is, I've done all that and no drags are initiated when I
drag on the items. I have this in my tableview delegate:
But tableView:writeRowsWithIndexes:toPasteboard: is never even
called. It seems to me that the examples have this code in the
datasource or something rather than the delegate, but like I said,
what do you do if you don't use a datasource.
If you haven't got a datasource, putting the methods in the delegate
isn't going to magically work. The methods must be in the datasource.
So add one!
This makes it clear that the methods are to be implemented by the
datasource:
http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/UsingDragAndDrop.html#/
/apple_ref/doc/uid/20000726
While I'm not familiar with bindings, I don't think there's a problem
with having a datasource as well as the bindings - the usual
datasource methods for supplying the table with data can probably be
missing or stubs.
hth,
Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden