Drag drop - namesOfPromisedFilesDroppedAtDestination has an indexSet = nil
Drag drop - namesOfPromisedFilesDroppedAtDestination has an indexSet = nil
- Subject: Drag drop - namesOfPromisedFilesDroppedAtDestination has an indexSet = nil
- From: "Simon Liu" <email@hidden>
- Date: Thu, 27 Apr 2006 21:37:53 +0100
I am able to drag'n'drop from my custom NSTableView to the
Desktop/Finder when I do not implement -mouseDragged: and just
implement:
- (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet
*)rowIndexes toPasteboard:(NSPasteboard*)pboard
- (NSArray *)tableView:(NSTableView *)tv
namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
forDraggedRowsWithIndexes:(NSIndexSet *)indexSet
This works fine, however there is a situation in my application where
I need to track mouseDown: events, and I do need to implement
mouseDragged:. So I make sure the drag pasteboard is setup correctly
for NSFilesPromisePboardType, and start the drag session myself with:
[self dragImage:dragImage at:dragPoint offset:NSZeroSize
event:theEvent pasteboard:pboard source:self slideBack:YES];
Everything seems to be okay, except that indexSet is nil when the
method below is invoked:
- (NSArray *)tableView:(NSTableView *)tv
namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
forDraggedRowsWithIndexes:(NSIndexSet *)indexSet
Why is the indexSet nil, when I implement mouseDragged: and start a
drag manually?
I have worked around this by placing the rowIndexes onto the
pasteboard under my own type, but I would like to know if somebody
else has come across this issue.
Thanks.
Simon
_______________________________________________
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