Re: drag and drop to another application
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.