Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Chris Idou
--- On Wed, 26/11/08, Michael Robinson <[EMAIL PROTECTED]> wrote: > I too had a horrible time implementing this. > > Below I've pasted the code that handles dnd re-ordering > in my table. > > Basically it just makes a copy of the dragged row, deletes > it, then rebuilds the array, inserting the

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread mmalcolm crawford
On Nov 26, 2008, at 2:02 AM, Jean-Nicolas Jolivet wrote: Sorry for not spotting that one earlier... I thought WithAndWithoutBinding was basically the same example only more recent...! I've updated the descriptions to try to make it more clear. mmalc _

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Michael Robinson
(I really did intend for this to reach the list, but I hurriedly pressed the "reply to sender" hotkey) Hi Jean-Nicolas I too had a horrible time implementing this. Below I've pasted the code that handles dnd re-ordering in my table. Basically it just makes a copy of the dragged row, deletes i

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Jean-Nicolas Jolivet
Got it! thanks a lot for the code! Sorry for not spotting that one earlier... I thought WithAndWithoutBinding was basically the same example only more recent...! J-N On 26-Nov-08, at 4:59 AM, mmalcolm crawford wrote: On Nov 26, 2008, at 1:42 AM, Jean-Nicolas Jolivet wrote: mmm interest

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread mmalcolm crawford
On Nov 26, 2008, at 1:42 AM, Jean-Nicolas Jolivet wrote: mmm interesting, I did download WithAndWithoutBindings before posting but it doesn't seem to implement drag and drop re- ordering... not in the WithBinding version at least... I'm trying it right now and it's definitely not working...

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Jean-Nicolas Jolivet
mmm interesting, I did download WithAndWithoutBindings before posting but it doesn't seem to implement drag and drop re-ordering... not in the WithBinding version at least... I'm trying it right now and it's definitely not working... It seems like when they are saying "re-ordering" they mea

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread mmalcolm crawford
On Nov 26, 2008, at 12:37 AM, Jean-Nicolas Jolivet wrote: Well it depends on which example you're talking about... you posted a google search result... The first link (a cocoa builder link) has nothing to do with row re- ordering... The second link (CocoaDev one) has a bunch of code examples

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Jean-Nicolas Jolivet
Thanks a lot Chaitanya... exactly the kind of info i was looking for! :) On 26-Nov-08, at 3:41 AM, chaitanya pandit wrote: 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 y

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread chaitanya pandit
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" alon

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Jean-Nicolas Jolivet
Well it depends on which example you're talking about... you posted a google search result... The first link (a cocoa builder link) has nothing to do with row re- ordering... The second link (CocoaDev one) has a bunch of code examples but a bunch are from users saying they're having problems

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread mmalcolm crawford
On Nov 26, 2008, at 12:06 AM, Jean-Nicolas Jolivet wrote: 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..) Did you look at the example? mmalc

Re: NSTableView Drag-Drop re-ordering...

2008-11-26 Thread Jean-Nicolas Jolivet
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

Re: NSTableView Drag-Drop re-ordering...

2008-11-25 Thread mmalcolm crawford
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??

NSTableView Drag-Drop re-ordering...

2008-11-25 Thread Jean-Nicolas Jolivet
I'm pretty sure this has been covered before, however I can't find any good examples on how to implement it?? Right now my NSTableView is hooked to a subclass of NSArrayController, and it supports files getting dropped on it.. (basically the NSTableView displays files dropped from the finde