• 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 tableView rows to an external applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Dragging tableView rows to an external applications
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Properties and bindings
  • Next by Date: Setting "Open With" program/file association programmatically (command line or script)
  • Previous by thread: Re: NSURLDownload resumeData always nil
  • Next by thread: Re: Dragging tableView rows to an external applications
  • Index(es):
    • Date
    • Thread