简体   繁体   中英

Can't Drag from NSTableView with more than one row

I'm writing an app that should allow me to drag items from an NSTableView to another view (custom timeline view). This works perfectly as long as there is only one item in my NSTableView. The fist images shows one item being dragged from the table view.

在此处输入图片说明

However, as soon as there is more than one item in my table view I can no longer drag from it. It just selects that row. The second image shows me trying to drag from the table view with more than one item. 在此处输入图片说明

Is there something I need to do to enable drag from the table view?

SOLVED . In my pasteboardWriterForRow delegate call I was returning nil instead of a valid object.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM