Thomas Leonard spoo'd forth:
> On Fri, Dec 12, 2003 at 06:32:57AM +0000, Stuart Langridge wrote:
>> Thomas Leonard spoo'd forth:
>> > On Wed, Dec 10, 2003 at 12:27:52AM +0000, Stuart Langridge wrote:
>> >> I'm trying to display, using Rox-Lib2, a savebox which will grab the
>> >> content of a URI of my choice and download it to the place the user
>> >> saves the savebox to. To clarify, imagine I already have a URI in the
>> >> "uri" variable. I do:
>> >> savebox = saving.SaveBox(saver(uri),
>> >> os.path.split(urlparse.urlparse(uri)),
>> >> 'application/octet-stream')
>> >> My savebox pops up fine. It also puts a default filename in the textbox
>> >> inside the savebox, and if I enter a full path into that textbox then
>> >> clicking "Save" works fine. However, if I drag the icon to a filer
>> >> window, then the filer (I think) throws the error:
>> >> XdndDirectSave0 target provided, but the atom XdndDirectSave0 (type
>> >> text/plain) did not contain a leafname
>> >> What does this mean?
>> > It means it couldn't read the property (set in ROX-Lib by
>> > _write_xds_property).
>> > What happens if you replace the second argument to the constructor with
>> > something like the string "MyFile"?
>> The textbox in the savebox is prefilled with "MyFile", and I get the
>> same error when I try and drag the icon from the savebox to a filer
> Works here. Does the download take a very long time? Otherwise, start from
> something that works (eg, Edit's savebox or the saving tutorial) and find
> out what change breaks it...
The download might well take a while: saver does this:
self.__uri = uri
fp = urllib.urlopen(self.__uri)
so the urllib download might take some time. Is there some other way I
should be doing this?
"Willow hath gat hare off rede
And doth geev soopurb heede.
Buffy, as written by Geoffrey Chaucer, the dirty mediaeval git."
-- Andy Spencer, after Certic