Re: [ANN]: TkDND 2.0 alpha...
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: [ANN]: TkDND 2.0 alpha...

From: Georgios Petasis <petasis@iit.demokritos.gr>
Date: Mon Apr 03 2006 - 18:13:05 CEST

<vince.darley@gmail.com> wrote in message
news:1144076804.686922.224240@v46g2000cwv.googlegroups.com...
>
> Georgios Petasis wrote:
>> <vince.darley@gmail.com> wrote in message
>> > Certainly for many common cases it is easy to provide the data up front
>> > (and that should be supported), but equally for many other common cases
>> > it is quite hopeless to provide all the data up front.
>>
>> What are these cases? The only one I know of is under windows, when
>> dragging files from compressed folders (or from winzip). It would be
>> interested
>> to know more cases.
>
> Here are a few other examples:
>
> With 'tclvfs', one can easily create a listing in Tcl of remote
> resources of all sorts of kinds (webdav, contents of zip, ftp, etc).
> One wants to be able to drag those out of Tcl into the native
> filesystem, and not just on Windows.

Alternative: Extract the file(s) from the zip (or anywhere alse on Tcl vfs)
into a temporary directory, and pass the file names to the drag action.
The target application will access the files and when everything is done,
you erase them. Actually, this is exactly what happens if you extract
files from a compressed folder under windows.

>
> With an image browser, one would want to be able to drag a thumbnail of
> an image which refers to a multi-megabyte RAW image on disk (which
> would be what is actually dropped on success.

Again I see a file name passing.

>
> With a database browser, again one wants to be able to drag things out
> into the filesystem, with the actual database query on happening on
> drop success.

Perhaps this is the only case that can be of interest. However, in most
cases
somebody that starts a drag operation want's to drop the data somewhere.
I assume a little wait want matter...

>
> etc.
>
> In all of the above cases it would be helpful to see a progress bar as
> part of the successful drop, just as you would typically see with a
> non-Tk application which implemented the above kinds of operations.
>
> cheers,
>
> Vince.
>

While in general I agree that it would be nice to have such an advanced
feature
in tkdnd (which of course is beyond my available time to code it), I don't
think
that there are other applications that can handle such cases. What is the
point
in providing all these, if you cannot drop the data in other apps? For now,
I think
its more realistic to support actions that are most common.

I was examining today the drag/drop of outlook express e-mails. Initially,
I explored the possibility of creating a virtual file to the data, so I
looked
at the memchan extension. The code I had to write was much more larger
than the whole tkdnd. It is very complex to write all these functions
to cover all the possible operations a user can do on a file. And, some are
impossible,
such as the size of the file...

So, I gave up, and I simply wrote in C in binary the contents of the file
onto the disk, and returned the disk filename. It was much more easier to
implement. And finally, the result is the same: you get the e-mails from
tk...

George
Received on Sun Apr 30 02:57:41 2006