• 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: NSFilesPromisePboardType
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFilesPromisePboardType


  • Subject: Re: NSFilesPromisePboardType
  • From: Nick Paulson <email@hidden>
  • Date: Fri, 8 Jan 2010 22:24:22 -0500

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 (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

_______________________________________________

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

  • Follow-Ups:
    • Re: NSFilesPromisePboardType
      • From: Jim Correia <email@hidden>
References: 
 >NSFilesPromisePboardType (From: Nick Paulson <email@hidden>)
 >Re: NSFilesPromisePboardType (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSFilesPromisePboardType
  • Next by Date: Re: NSDatePicker 24 hour clock
  • Previous by thread: Re: NSFilesPromisePboardType
  • Next by thread: Re: NSFilesPromisePboardType
  • Index(es):
    • Date
    • Thread