Thanks all. Yeah I had the validateDrop part, but I guess what I was looking for was UTTypeConformsTo. I think it's under control now thanks for the help!
On Mar 5, 2012, at 5:41 AM, David Riggle wrote: > I think you also need to register for the drag types via > -registerForDraggedTypes. I pass in a mix of UTIs and legacy pboard types and > it seems to work. For example: > > [tableView registerForDraggedTypes:[NSArray arrayWithObjects:(NSString > *)kUTTypeURL, NSPasteboardTypeString, @"ABPeopleUIDsPboardType", nil]]; > > In your -validateDrop method you can check the pasteboard for URLs that > conform to local image files, for example. > > The new NSPasteboard routines are poorly documented and badly represented in > the sample code. Good luck figuring them out. > >> Message: 5 >> Date: Sun, 04 Mar 2012 07:01:30 -0800 >> From: Jerry Krinock <je...@ieee.org> >> To: Cocoa-Dev List <cocoa-dev@lists.apple.com> >> Subject: Re: setAllowedFileTypes: (or similar) for NSPasteboard >> Message-ID: <7c036771-17a3-44da-85ff-ff04dad10...@ieee.org> >> Content-Type: text/plain; charset=utf-8 >> >> >> On 2012 Mar 04, at 01:28, Rick C. wrote: >> >>> I want to make a UTI array to limit what can be dragged onto my TableView. >> >> Implement -tableView:validateDrop:proposedRow:proposedDropOperation: and >> return NSDragOperationNone if the [info draggingPasteboard] contains stuff >> you don't want. >> >>> Sorry if I'm missing the obvious here >> >> Drag and drop is not obvious. See: Table View Programming Guide ▸ Using >> Drag and Drop in Tables. >> > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/rickcorteza%40gmail.com > > This email sent to rickcort...@gmail.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com