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