Dragging a file out of an NSTableView
Dragging a file out of an NSTableView
- Subject: Dragging a file out of an NSTableView
- From: Chris Hanson <email@hidden>
- Date: Tue, 25 Mar 2003 23:40:40 -0600
I need to drag a file - generated on the fly - out of an NSTableView
and into the Finder.
I think the way to do this will be to generate a file promise.
However, I'm using an NSTableView, so I can't simply override
-[NSView dragPromisedFilesOfTypes:fromRect:source:slideBack:event:].
OK, I figure I'll attempt to create a promise from scratch. In
handling the drag in the table in my table data source, I use:
[pasteboard declareTypes:
[NSArray arrayWithObject:NSFilesPromisePboardType]
owner:self];
success = [pasteboard setPropertyList:
[NSArray arrayWithObject:@"myExtensio"]
forType:NSFilesPromisePboardType];
And then in my NSTableView subclass, I override
-namesOfPromisedFilesDroppedAtDestination:. (In doing so I'm
assuming that in a drag initiated by an instance of NSTableView, that
the NSTableView instance is the drag's owner.) However, the Finder
refuses my drag.
Does anyone have any suggestions as to how to go about this? I'm
running out of ideas.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.