Hi,

I am developing an desktop application in which I want to copy the multiple image files to the system clipboard. When I try to paste it in the Finder, the image files should be pasted. This is the behavior similar to Finder Copy-Paste. (I want to copy the file paths which when pasted, actual file is pasted; Not file paths in text/string format).

I tried using NSFilenamesPboardType, NSFIleContentsPboardType. But system clipboard doesn't accept it.

The code using NSFilenamesPboardType:

NSPasteboard *pasteboard =[NSPasteboard pasteboardWithName: NSGeneralPboard]; [pasteboard declareTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,nil] owner:nil]; [pasteboard setPropertyList: filePaths forType: NSFilenamesPboardType]; // filePaths is array of files paths of images

When I tried to access propertyList from the pasteboard within the application, I could get the array of file paths. But, it doesn't add anything to the system clipboard. So, I am not able to copy the files to the other applications.
(I don't want to use Drag and Drop to support inter-app copy-paste).

Could anyone help me out to solve this problem.

Thanks in advance.

Thanks and Regards,
Deepa
de...@robosoftin.com


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
_______________________________________________

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

Reply via email to