• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Dragging a file out of an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Dragging a file out of an NSTableView
      • From: Mason Mark <email@hidden>
  • Prev by Date: Cocoa-Java frameworks
  • Next by Date: [ANN] Part 2 of integrating Cocoa and VTK article published
  • Previous by thread: Cocoa-Java frameworks
  • Next by thread: Re: Dragging a file out of an NSTableView
  • Index(es):
    • Date
    • Thread