• 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
Re: drag and drop to another application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drag and drop to another application


  • Subject: Re: drag and drop to another application
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 18 Nov 2003 09:18:10 +0100

On mardi, novembre 18, 2003, at 07:29 AM, Donald Hall wrote:

I want to be able to drag some text out of a table in my application
and drop it on another application's document. I implement
tableView:writeRows:toPasteboard and write the data onto the passed
in pasteboard using the NSStringPboardType and
NSMacOSRomanStringEncoding. I can copy and paste the same text into
say TextEdit without problem, but if I try to drag and drop the text,
the other application refuses my drop. (Note that drag and drop
within my application's tables is working just fine.)

Can anyone tell me how to achieve the drag and drop? My guess is that
it is some kind of wrong pasteboard issue. Should I be specifying a
different pasteboard other than the one passed to me in
tableView:writeRows:toPasteboard?

Thanks for any info,

Could it be the usual issue with the need to implement this method in a subclass of NSTableView:

- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
{
if (isLocal) return NSDragOperationEvery;
else return NSDragOperationCopy;
}

?
_______________________________________________
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: drag and drop to another application
      • From: Donald Hall <email@hidden>
References: 
 >drag and drop to another application (From: Donald Hall <email@hidden>)

  • Prev by Date: getting the system's time format
  • Next by Date: Animated GIF from Cocoa app help-file?
  • Previous by thread: drag and drop to another application
  • Next by thread: Re: drag and drop to another application
  • Index(es):
    • Date
    • Thread