RE: How to detect a paste request for file copy/paste?
RE: How to detect a paste request for file copy/paste?
- Subject: RE: How to detect a paste request for file copy/paste?
- From: Ling Li <email@hidden>
- Date: Thu, 11 Dec 2008 12:14:51 -0800
- Acceptlanguage: en-US
- Thread-topic: How to detect a paste request for file copy/paste?
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=email@hidden
> [mailto:cocoa-dev-bounces+lingli=email@hidden]
> On Behalf Of Conor
> Sent: Wednesday, December 10, 2008 1:42 AM
> To: email@hidden
> 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 (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