Re: NSTableView drag & drop string
Re: NSTableView drag & drop string
- Subject: Re: NSTableView drag & drop string
- From: Seth Willits <email@hidden>
- Date: Wed, 20 Nov 2013 11:20:24 -0800
On Nov 20, 2013, at 10:00 AM, Todd Heberlein <email@hidden> wrote:
> I’m trying a very simple test (I just want the string “foo” to be dropped in an email message) that I cannot seem to make work. What am I missing? (setString:forType: is returning YES)
>
>
> - (BOOL)tableView:(NSTableView *)tv
> writeRowsWithIndexes:(NSIndexSet *)rowIndexes
> toPasteboard:(NSPasteboard *)pboard;
> {
> [pboard declareTypes: [NSArray arrayWithObject: NSPasteboardTypeString]
> owner: self];
> if ([pboard setString: @"foo" forType: NSPasteboardTypeString] == YES) {
> NSLog(@"setString worked");
> return YES;
> }
> return NO;
> }
You’re putting it in the dragging pasteboard instead of the general pasteboard.
--
Seth Willits
_______________________________________________
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