Re: NSFilesPromisePboardType
Re: NSFilesPromisePboardType
- Subject: Re: NSFilesPromisePboardType
- From: Jim Correia <email@hidden>
- Date: Fri, 8 Jan 2010 21:51:47 -0500
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 (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