• 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: NSTableView drag & drop string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSTableCellView for view-based outline view
  • Next by Date: Re: NSTableCellView for view-based outline view
  • Previous by thread: Re: NSTableCellView for view-based outline view
  • Next by thread: file url to string path
  • Index(es):
    • Date
    • Thread