Thanks for help. I tried that but still not work. Actually what you said is right with DnD. In my code the promised drag works perfectly well, but this is for file copy/paste :) What is want is that if user click 'paste' in Finder, my app should get notice with destination directory and start file copy (like promised drag did). Can I call dragPromisedFilesOfTypes for copy/paste instead of DnD? I think dragPromisedFilesOfTypes just start a promised drag, not put something into general pasteboard. Or OSX does not support promised paste at all?
Ling > -----Original Message----- > From: cocoa-dev-bounces+lingli=vmware....@lists.apple.com > [mailto:cocoa-dev-bounces+lingli=vmware....@lists.apple.com] > On Behalf Of Conor > Sent: Wednesday, December 10, 2008 1:42 AM > To: cocoa-dev@lists.apple.com > Subject: Re: How to detect a paste request for file copy/paste? > > You still need to give the pasteboard an array of the file > type for NSFilesPromisePboardType. Your missing the line: > > [pboard setPropertyList:[NSArray arrayWithObjects:@"txt", > nil] forType:NSFilesPromisePboardType]; > > But I would recommend initiating the promised drag with the NSView's > method: > > - (BOOL)dragPromisedFilesOfTypes:(NSArray *)typeArray fromRect: > (NSRect)aRect source:(id)sourceObjectslideBack:(BOOL)slideBack event: > (NSEvent *)theEvent; > > file:///Developer/Documentation/DocSets/com.apple.ADC_Referenc > e_Library.CoreReference.docset/Contents/Resources/Documents/do > cumentation/Cocoa/Conceptual/DragandDrop/Tasks/DraggingFiles.html > > Conor > http://www.bruji.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/lingli%40vmware.com > > This email sent to lin...@vmware.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