Created
May 27, 2011 19:45
-
-
Save danielwestendorf/996000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tableView(aView, writeRowsWithIndexes:rowIndexes, toPasteboard:pboard) | |
row_data_array = [] #lets create an array to place the rows' data in | |
rowIndexes.each do |row| #for each of the rows being dragged. Row represents the index in the table's data source array | |
row_data_array << table_data_array[row] #add the data to the row_data_array | |
end | |
pboard.setString(row_data_array.to_yaml, forType:"MyRowDataType") #convert the array to YAML, then store it in the pasteboard. The type should be a custom type or your choice, unless you want to accept drops from other locations. | |
return true #the method must return true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment