• 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: Donald Hall <email@hidden>
  • Date: Tue, 18 Nov 2003 23:57:37 -0700

Stiphane,

Thanks so much. That is the solution. If dragging is only between my tables, this method is not needed - the data source handles everything. When I implemented the method in my TableView subclass I was able to drag and drop a row of the table as text into TextEdit.

Don

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;
}

?


--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
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.

References: 
 >Re: drag and drop to another application (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: [OT] replace newline character with sed
  • Next by Date: Re: [OT] replace newline character with sed
  • Previous by thread: Re: drag and drop to another application
  • Next by thread: Should I upgrade to 1.4.2 on Mac OS X 10.3.1?
  • Index(es):
    • Date
    • Thread