Re: Bug in 10.6 NSPasteboard API? (was: Sending a list of path strings to the Finder via Scripting Bridge)
Re: Bug in 10.6 NSPasteboard API? (was: Sending a list of path strings to the Finder via Scripting Bridge)
- Subject: Re: Bug in 10.6 NSPasteboard API? (was: Sending a list of path strings to the Finder via Scripting Bridge)
- From: Ken Thomases <email@hidden>
- Date: Sun, 27 May 2012 22:19:33 -0500
On May 26, 2012, at 4:41 AM, Peter wrote:
> thank you very much for your enlightening and in-depth explanation!
You're welcome.
> With the old API I could (and still do) put a list of path strings with empty elements on the pasteboard, e.g. four paths, the third one empty as in
>
> /path1/item1
> /path2/item1
>
> /path2/item2
>
> but since the new API moved to NSURLs I don't see a way to accomplish this. I could not find something like an empty NSURL. I use this for copying data from a table area to another table or table area, meaning the empty element is a valid piece of data. Any ideas?
I'm not certain. You can try putting an NSPasteboardItem to which you haven't added any data in the list of items. You can try adding some other type of data, perhaps a custom type which indicates to your app that there's no data. You can put a different kind of NSURL, rather than a file URL, perhaps with a custom scheme meaningful only to your app. Etc.
The main thing is to think of the pasteboard contents as multiple items, each with its own types/representations, which can be (but doesn't have to be) different from all of the other items.
Regards,
Ken
_______________________________________________
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