dragging from view based table view
dragging from view based table view
- Subject: dragging from view based table view
- From: Koen van der Drift <email@hidden>
- Date: Tue, 29 May 2012 08:24:45 -0400
This weekend I switched from a cell-based table view to a view-based
table view (OS X) . It is a one column table, and I use two static
text items in each cell to display some info, bound to my
NSArrayController. So far so good, I subclassed NSTableCellView and
can modify the appearance of the text in the cell.
However, I noticed that dragging cells from the table is not working
anymore (it did work with the cell based table view). I call
registerForDraggedTypes for my tableview, and implemented
tableView:writeRowsWithIndexes:toPasteboard:
I found the TableViewPlayground sample code, and it says there: "using
custom NSTableRowView instances supporting the pasteboard which allows
single cell dragging and multi-image dragging".
Is this the way to go now, do I need to subclass NSTableRowView for
dragging within and out of an NSTableView?
BTW, how do I get those fancy semi-transparent table headers where the
cells seem to be disappearing under when scrolling?
- Koen.
_______________________________________________
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