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 (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