Dragging tableView rows to an external applications
Dragging tableView rows to an external applications
- Subject: Dragging tableView rows to an external applications
- From: Steve Cronin <email@hidden>
- Date: Tue, 23 Sep 2008 04:00:34 -0500
Folks;
I'm trying in 10.4+ to implement dragging data from a tableView to the
desktop.
My problem is probably a dunderhead oversight but I can't see it.
I have NOT subclassed an NSTableView.
In a windowController I do the following in -awakeFromNib:
(myTableView is an Outlet)
...
[myTableView registerForDraggedTypes:[NSArray
arrayWithObjects:NSFilenamesPboardType, NSFilesPromisePboardType, nil]];
[myTableView setDraggingSourceOperationMask:NSDragOperationNone
forLocal:YES]; //local
[myTableView setDraggingSourceOperationMask:NSDragOperationCopy
forLocal:NO]; // external
...
I get a local copy, drag some selected rows initiates a 'carrying'
cursor, but as soon as I leave my application it invalidates.
This is exactly the opposite of the desired/expected behavior...
NOTE: If I change both drag operations in the
setDraggingSourceOperation method to NSDragOperationEvery - no
difference.
myTableView has the windowController set as its delegate.
The tableView:writeRowsWithIndexes:toPasteboard is being called (its
in the windowController too)
What am I overlooking?
Steve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden