To re-order the items in the tableView, you will have to implement a custom drag type.
Say for example you name your custom drag type as @"myDragType"
then
1] Register your table view to accept this drag type using "registerForDraggedTypes:" and passing an array containing @"myDragType" along with super's drag types 2] In your tableView's data source, implement this method "tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes :" and return an array containing @"myDragType". 3] Implement "tableView:writeRowsWithIndexes:toPasteboard:" in your data source and write any dummy data in the given pasteboard for type @"myDragType", this can be the data representing the items/indexes being dragged 4] Check for a valid drop with "tableView:validateDrop:proposedRow:proposedDropOperation:" 5] Finally set the new indexes for the dragged items in "tableView:acceptDrop:row:dropOperation:"
HTH,
Chaitanya

On 26-Nov-08, at 1:36 PM, Jean-Nicolas Jolivet wrote:

As I said... I have no problems with dragging files on the data table... my table is already a drag destination and its working well...with the bindings in place etc...

What I can't find is good info about re-ordering the table row with drag and drop, and I did search google for the obvious key words (NSTableView drag drop order, NSTableView re-order etc etc..)

But thanks anyway...


On 26-Nov-08, at 2:58 AM, mmalcolm crawford wrote:


On Nov 25, 2008, at 11:26 PM, Jean-Nicolas Jolivet wrote:

I'm pretty sure this has been covered before, however I can't find any good examples on how to implement it??

<http://www.google.com/search?client=safari&rls=en-us&q=nstableview+drag+drop+bindings&ie=UTF-8&oe=UTF-8 > <http://www.google.com/search?client=safari&rls=en-us&q=table+view++drag+drop+bindings&ie=UTF-8&oe=UTF-8 >

mmalc



Jean-Nicolas Jolivet
[EMAIL PROTECTED]
http://www.silverscripting.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to