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.



Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Subscribe to new posts:

You'll get an email whenever a I publish a new post to my blog and nothing more. -- Corbin

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2024 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

65 queries. 0.162 seconds.

Log in