Problem in copying files to the system clipboard
Problem in copying files to the system clipboard
- Subject: Problem in copying files to the system clipboard
- From: Deepa <email@hidden>
- Date: Fri, 31 Jul 2009 18:08:49 +0530
- "x-copyrighted-material: http://www.robosoftin.com"
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
email@hidden
-----------------------------------------------
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 (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