dragging from view based table view

  • 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.
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today