I will start a new topic here but my sample project is still the two-tables project using array controllers and bindings.
I have spent several days trying to understand and implement drag and drop but it seems daunting. This may be one for oBJ-C classes to handle.
I have read that you can use dataSource along side the bindings so I am doing that since the drag and drop methods are for the dataSource.
So far I have:
connected the tableViews outlet to my app delegate script and selected “datasource” - I know this works because I had tried (unsuccessfully) to use dataSource methods for tableView:objectValueForTableColumn:row: and the methods were getting called.
set aTableViewsDragTypes to NSArray's arrayWithObject_("NSFilenamesPboardType", missing value)
the log shows:
I assume that means it sees the “register” request?
Now the tricky part. You need three methods for the table to accept a drag and drop:
on tableView_writeRowsWithIndexes_toPasteboard_(aTableView, missing value, missing value)
on tableView_validateDrop_proposedRow_proposedDropOperation_(aTableView, missing value, 1, missing value)
on tableView_acceptDrop_row_dropOperation_(aTableView, true, missing value)
As you can see I haven’t added and code to these but hope it would at least log that they are called. maybe not.
This used to be so easy from ASS! But that is the challenge. I may attempt to create the class files for this and see if that works… hmmm
here is a pretty clear explanation:
Any direction here much appreciated, Rob