Discussion:
Pasteboard and NSImage and Finder
(too old to reply)
Daniel Santos
2018-04-09 22:12:24 UTC
Permalink
Hello all,

I am pasting an array of NSImage to the general pasteboard. (using pasteboard .writeObjects())
I would like to be able to paste the images onto Finder. What do I need to do ?

Thanks in advance
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.narkive.net
Rob Petrovec
2018-04-09 22:25:27 UTC
Permalink
You need to put files on the pasteboard. Finder only plays with files, not raw image data.

—Rob
Post by Daniel Santos
Hello all,
I am pasting an array of NSImage to the general pasteboard. (using pasteboard .writeObjects())
I would like to be able to paste the images onto Finder. What do I need to do ?
Thanks in advance
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.
Daniel Santos
2018-04-10 18:44:18 UTC
Permalink
That thought crossed my mind. I don’t want to write the file to disk, just have a NSFile object in memory, is that possible ?

Daniel
Post by Rob Petrovec
You need to put files on the pasteboard. Finder only plays with files, not raw image data.
—Rob
Post by Daniel Santos
Hello all,
I am pasting an array of NSImage to the general pasteboard. (using pasteboard .writeObjects())
I would like to be able to paste the images onto Finder. What do I need to do ?
Thanks in advance
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.narki
Rob Petrovec
2018-04-10 20:29:29 UTC
Permalink
Nope. Pasteboard does not support ‘promised' data like drags do. Sorry. You could write them to a temporary folder (e.g. NSTemporaryDirectory()) and then stuff the URLs on the pasteboard.

—Rob
Post by Daniel Santos
That thought crossed my mind. I don’t want to write the file to disk, just have a NSFile object in memory, is that possible ?
Daniel
Post by Rob Petrovec
You need to put files on the pasteboard. Finder only plays with files, not raw image data.
—Rob
Post by Daniel Santos
Hello all,
I am pasting an array of NSImage to the general pasteboard. (using pasteboard .writeObjects())
I would like to be able to paste the images onto Finder. What do I need to do ?
Thanks in advance
_______________________________________________
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@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:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net
Continue reading on narkive:
Loading...