Re: Table with cells as dragging destination?
Re: Table with cells as dragging destination?
- Subject: Re: Table with cells as dragging destination?
- From: Graham Cox <email@hidden>
- Date: Mon, 12 Apr 2010 09:52:19 +1000
On 09/04/2010, at 1:26 AM, Izak van Langevelde wrote:
> I implemented the table as an NSTableView with NSImageCells, I know about the standard drag and drop for table rows.
> However, I am clueless about how to use cells as dragging destination.
> Am I supposed to subclass NSTableView, and implement drag and drop, including all gory details? Are there any examples available?
> Is there another view more suitable for what I'm trying to achieve?
You should be able to do it all with delegate/dataSource methods.
You are not dragging data to the table view's cells. You are dragging data to the underlying data model, which the table view displays (the table view only has one cell per column anyway).
When you receive the drag, handled by the datasource dragging callbacks, just insert the new image data into your data model and ask the table to redisplay. Simple as.
--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