NSTableView Drag & Drop as a string
NSTableView Drag & Drop as a string
- Subject: NSTableView Drag & Drop as a string
- From: Todd Heberlein <email@hidden>
- Date: Thu, 24 Sep 2009 18:58:51 -0700
I have an NSTableView and I have Drag & Drop working between table
views for my application where I encode the object to an NSData and
write it to the NSPasteboard. But now I want to create a string
representation of the object, add it to the pasteboard as well, and
then when the object is dragged to something like an email, the string
representation of the object is written in. The content does seem to
be written to the pasteboard, but the "drop" doesn't seem to happen in
an appropriate target (email message, editor, etc.)
The same basic code works in -copy: but it doesn't seem to work in -
tableView:writeRowsWithIndexes:toPasteboard:
The line of code is:
[pboard setString:str forType:NSStringPboardType];
Is there something different with the NSPasteboard passed into -
tableView:writeRowsWithIndexes:toPasteboard: versus the pasteboard you
get from [NSPasteboard generalPasteboard]? Any suggestions on what I
am doing wrong?
Thanks,
Todd
_______________________________________________
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