Cocoa: Targeting the entire tableview in a drop operation

Apple, Cocoa, General

Hi Programmers.

If you are doing drag and drop in an NSTableView with Cocoa, you can use the following method in your “validateDrop” datasource method to retarget the row it is going to:

– (void)setDropRow:(int)row dropOperation:(NSTableViewDropOperation)op;

The documentation is missing something. If you specify a row of -1 and a dropOperation of NSTableViewDropOn, it will target the entire tableview, as opposed to an individual row.

Previous in objc
no_thumbnail
Cocoa: drop down menu buttons
Next in objc
no_thumbnail
Cocoa: NSArrayController and two tableview's

Leave a Reply

avatar
500
  Subscribe  
Notify of

(c) 2008-2019 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

88 queries. 0.196 seconds.

Log in