I want to implement a delayed file paste feature for file copy/paste. When I 
first put file lists into the clipboard, the files are actually not existing 
yet (in another unmapped network place). These files will only be created after 
got the paste request. So my question is how to detect the paste request? I 
tried to implement NSFilesPromisePboardType for copy/paste, but never work. So 
my question is, after I put something into pasteboard, how can I get 
notification when another application does paste?
 
Here is my test code:
 
   NSPasteboard *pboard = [NSPasteboard generalPasteboard];
   NSMutableArray *types = [[NSMutableArray alloc] init];
   [types addObject:NSFilesPromisePboardType];
   [pboard declareTypes:types owner:self];
   [types release];
 
I also implemented namesOfPromisedFilesDroppedAtDestination, which just provide 
the file path. After I run, the paste item with both Finder and 
PasteboardKeeper is never highlighted, so I can not paste. If I click 'Show 
clipboard', it shows nothing in the window, and show 'Clipboard contents: 
unknown' in the bottom status bar.
 
I also tried first put NSFilenamesPboardType into pboard, and implemented 
pasteboard:provideDataForType:, and still nothing happen.
 
So my question is:
1. Is there any promised file copy/paste?
2. How can I get paste notification? Can I get destination path then I can 
write files directly to destination like promised DnD did?
 
Thanks for any help.
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to