I am doing the following code: NSArray *filenames = [sender namesOfPromisedFilesDroppedAtDestination:[NSURL fileURLWithPath:@"/"]];
However, it is getting the following lines in console: Couldn't get a copy of an HFS Promise from the pasteboard Looked for HFSPromises on the pasteboard, but found none. I am dragging from iTunes in list view to my own view. Am I making a mistake somewhere? --Nick On Jan 8, 2010, at 9:51 PM, Jim Correia wrote: > On Jan 8, 2010, at 7:52 PM, Nick Paulson wrote: > >> Can someone please explain to me how I handle NSFilesPromisePboardType? I >> register for the dragged types, but I don't understand exactly how to get >> the data. > > Did you read the documentation? > > <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/DragandDrop/Tasks/DraggingFiles.html> > > What part of the inline sample code are you having trouble understanding? > > NSURL *dropLocation; // Assume this exists > > - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender > { > NSPasteboard *pboard = [sender draggingPasteboard]; > > if ( [[pboard types] containsObject:NSFilesPromisePboardType] ) > { > NSArray *filenames = [sender > > namesOfPromisedFilesDroppedAtDestination:dropLocation]; > // Perform operation using the files’ names, but > without the > // files actually existing yet > } > return YES; > } > > > - Jim_______________________________________________ > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/cocoa%40nickpaulson.com > > This email sent to co...@nickpaulson.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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com