[plt-scheme] Re: drag and drop in X

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Nov 28 20:32:43 EST 2006

At Wed, 29 Nov 2006 01:23:32 +0000, "Johan Holmquist" wrote:
> - When converting the "path" object (given to "on-drop-file") to a
> string and printing, the string contains double newlines in the end.
> 
> - When dropping several files on the application, the "path" object
> (given to "on-drop-file") will actually contain several paths,
> separated by (in my case) double newlines. I guess the "path" object
> is only supposed to hold a single path (!) so sending multiple paths
> by dnd would not be possible for now. Then it would be nice if the uri
> was trimmed off any ending newlines and multiple paths except the
> first one, before being put in the "path"-object.

More generally, it sounds like MrEd is mis-parsing "text/uri-list".
I'll bet the "-list" part means that it's a sequence of URIs, probably
separated by CRLF. And probably there can be % escapes in each URI.
I'll go read a "text/uri-list" spec and try to implement it correctly.

One multiple URIs are in the list, one "test/uri-list" message should
trigger multiple `on-drop-file' calls. That's fine; it's essentially
what happens on other platforms.

Matthew



Posted on the users mailing list.