Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 10:40 AM, Peter Hudson wrote: I would do this as follows :- At the same time that you write rows to the pasteboard in the source table, store locally ( perhaps in the source table data source ) the row indexes that were written to the pasteboard. Set observation for a

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Quincey Morris
On Aug 10, 2011, at 08:12 , Izak van Langevelde wrote: On 2011-08-10, at 10:40 AM, Peter Hudson wrote: I would do this as follows :- At the same time that you write rows to the pasteboard in the source table, store locally ( perhaps in the source table data source ) the row indexes

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Jens Alfke
On Aug 9, 2011, at 8:43 PM, Izak van Langevelde wrote: Now I want to allow drag and drop from one document to another, and my first guess was to write the row data to the pasteboard. What puzzles me, is how to delete the row data from the source data, in case of a move. That is, my

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 5:11 PM, Jens Alfke wrote: On Aug 9, 2011, at 8:43 PM, Izak van Langevelde wrote: Now I want to allow drag and drop from one document to another, and my first guess was to write the row data to the pasteboard. What puzzles me, is how to delete the row data from the

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Mark Munz
Docs say draggedImage:endedAt:operation: has been around since 10.0 In 10.7, NSDraggingSource became a formal protocol, but the informal protocol has been around a while. On Wed, Aug 10, 2011 at 2:30 PM, Izak van Langevelde eezac...@xs4all.nl wrote: On 2011-08-10, at 5:11 PM, Jens Alfke wrote:

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Jens Alfke
On Aug 10, 2011, at 2:30 PM, Izak van Langevelde wrote: I considered it, but it seems to have been available since Lion, and am looking for something which works on older systems. No, Lion just added a new equivalent method -draggingSession:endedAtPoint:operation:, which will eventually

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 5:37 PM, Jens Alfke wrote: On Aug 10, 2011, at 2:30 PM, Izak van Langevelde wrote: I considered it, but it seems to have been available since Lion, and am looking for something which works on older systems. No, Lion just added a new equivalent method

NSTableView: move rows through drag and drop?

2011-08-09 Thread Izak van Langevelde
I implemented drag and drop in an NSTableView by writing the row indexes of the rows to be copied/moved to the pasteboard, which works. Now I want to allow drag and drop from one document to another, and my first guess was to write the row data to the pasteboard. What puzzles me, is how to