Re: Strings mangled on generalPasteboard
Re: Strings mangled on generalPasteboard
- Subject: Re: Strings mangled on generalPasteboard
- From: Jens Alfke <email@hidden>
- Date: Mon, 23 Nov 2009 19:23:45 -0800
On Nov 23, 2009, at 5:54 PM, Kevin Walzer wrote:
> Basically, what I'm trying to do is implement basic drag support for a cross-platform GUI library that runs on top of Cocoa (Tk). My approach is retrieve string data from the drag pasteboard (either a raw string, an array of file paths, or, if it can be done simply, a URL like "http://www.apple.com") and dump it to the general clipboard, where it will be available to Tk. Because of the somewhat generic intent of this library, I need to support strings and file paths at a minimum. NSURL, unfortunately, complicates this design more than I would like.
To be frank, the reason URLs aren't working is simply because your code has a bug, as I explained in my last message. It could easily be rewritten to do what you want to do. This has nothing to do with NSURL.
What you want is something like
if there are files on the pasteboard
store the file path(s)
else if there are URLs
store the URLs
else if there are strings
store the strings
—Jens_______________________________________________
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