validateDrop in NSTableView never called
validateDrop in NSTableView never called
- Subject: validateDrop in NSTableView never called
- From: Tristan Jehan <email@hidden>
- Date: Sat, 8 Apr 2006 15:39:35 -0400
I've been struggling with drag-and-drop in an NSTableView for a while
now.
I have an NSTableView setup like in the "Bookmarks" example. The data
source and delegate of it is a subclass of an NSArrayController where
is implemented at least the three methods:
tableView:writeRowsWithIndexes:toPasteboard:,
tableView:validateDrop:proposedRow:proposedDropOperation:, and
tableView: acceptDrop:row:dropOperation:
I register the drag-and-drop in the awakeFromNib function of that
NSArrayController with: [tableView registerForDraggedTypes: [NSArray
arrayWithObjects: CopiedRowsType, MovedRowsType, nil]]; and that gets
passed just fine.
At runtime, tableView:writeRowsWithIndexes:toPasteboard: gets called
and returns YES. However
tableView:validateDrop:proposedRow:proposedDropOperation: and
tableView: acceptDrop:row:dropOperation: never get called and the
dragged row goes back to its initial location. What am I possibly
doing wrong? Thanks.
Tristan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden