Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.tcl

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2012, 10:39 AM
Georgios Petasis
Guest
 
Posts: n/a
Default ANNOUNCE: TkDND 2.5

I am pleased to announce version 2.5 of the TkDND extension.

What is new in TkDND 2.5?
--------------------------------------------------

1) Improved support for accepting drops under Linux.

2) Added support for dragging under Linux.

3) Fixes for the CF_HDROP type under Windows.

4) A new cross-platform type (DND_Color) for transferring colors.
Currently available only under UNIX (XDND protocol).

This is the first TkDND 2.x release that has support for both dragging
and dropping under all 3 major operating systems (Windows, OS X, Linux).

A detailed change log can be found here:

http://tkdnd.svn.sourceforge.net/vie...og?revision=78

What is TkDND?
--------------------------------------------------
TkDND is a binary extension for Tk, which adds native drag & drop
capabilities to the Tk toolkit. It can be used with any Tk version equal
or greater to 8.3.3 and currently only the UNIX (X-Windows), Microsoft
Windows (XP, Vista, 7) and OS X (Leopard) operating systems are
supported (Tk 8.6 is required for OS X).

The project home page, including documentation, examples and download
links, can be found at:

https://sourceforge.net/projects/tkdnd/

http://www.ellogon.org/petasis/tcltk-projects/tkdnd

How to get it?
--------------------------------------------------
TkDND can be downloaded from the following locations:

Sources:
http://sourceforge.net/projects/tkdn...ar.gz/download

Windows 32bit Binaries:
http://sourceforge.net/projects/tkdn...6.zip/download

Windows 64bit Binaries: -

Linux 32bit Binaries:
http://sourceforge.net/projects/tkdn...ar.gz/download

Linux 64bit Binaries:
http://sourceforge.net/projects/tkdn...ar.gz/download

OS X 10.7.3 64bit Binaries: -

All files: https://sourceforge.net/projects/tkdnd/files/

George Petasis
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 06-20-2012, 06:26 AM
Harald Oehlmann
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Congratulation for the great package.

> 2) Added support for dragging under Linux.

So you solved the issue that the tk core must be extended to deliver a
timestamp?

Congratulations,
Harald
Reply With Quote
  #3 (permalink)  
Old 06-20-2012, 07:07 AM
George Petasis
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Στις 20/6/2012 09:26, ο/η Harald Oehlmann *γραψε:
> Congratulation for the great package.
>
>> 2) Added support for dragging under Linux.

> So you solved the issue that the tk core must be extended to deliver a
> timestamp?
>
> Congratulations,
> Harald


No, I have used a parallel implementation of getting the selection (not
without some minor problems). You may notice some timeouts (error
"selection owner didn't respond"). In most of the cases you can avoid
this by clicking in the Tk toplevel after the drop. But in some rare
cases you will have to repeat the drop.

I think that Tk in some cases gets "lazy" and my code does not receive
the X events it should. I don't know why this happens.

Finally, the code has been written after studying how Qt reads the
clipboard when a drop occurs, since Qt was the problem and its data need
to be fetched with a specific timestamp. GTK is not strict with respect
to the timestamp, and dropped data can be fetched with Tk selection
commands. But since I cannot know if the remote application is a GTK
one, the new code is used for getting all dropped data.

George
Reply With Quote
  #4 (permalink)  
Old 07-12-2012, 06:03 PM
Googie
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Hello George,

First of all let me say that this is an outstanding job you're doing here!
Unfortunately I could not get it working on my Linux (KDE 4.8.2, Qt 4.8.1).I tested it with very simple script:

package require tkdnd
tkdnd::drop_target register . DND_Files
bind . <<Drop>> {puts %D; list copy}

and after dropping a file I had to wait for couple of seconds, when an error appeared:

selection owner didn't respond
selection owner didn't respond
while executing
"_selection_get -displayof $_drop_target -selection XdndSelection -type $type -time $time"
(procedure "_GetDroppedData" line 28)
invoked from within
"_GetDroppedData $time"
(procedure "tkdnd::xdnd::_HandleXdndDrop" line 24)
invoked from within
"tkdnd::xdnd::_HandleXdndDrop 768526336"

Then I tried with DND_Text:

package require tkdnd
tkdnd::drop_target register . DND_Text
bind . <<Drop>> {puts %D; list copy}

and this time no errors were raised, but the even handler was not called almost at all - I managed to get it colled once per 10-20 drops of text. Thenafter few more drops I closed "." window and I had to wait couple of seconds for application to exit - then it crashed with Segmentation Fault.

Can I help you somehow? Can I debug it somehow? I'm using ix86 binary from SF downloads.

Regards,
Pawel
Reply With Quote
  #5 (permalink)  
Old 07-12-2012, 07:43 PM
George Petasis
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Στις 12/7/2012 21:03, ο/η Googie *γραψε:
> Hello George,
>
> First of all let me say that this is an outstanding job you're doing here!
> Unfortunately I could not get it working on my Linux (KDE 4.8.2, Qt 4.8.1). I tested it with very simple script:
>
> package require tkdnd
> tkdnd::drop_target register . DND_Files
> bind . <<Drop>> {puts %D; list copy}
>
> and after dropping a file I had to wait for couple of seconds, when an error appeared:
>
> selection owner didn't respond
> selection owner didn't respond
> while executing
> "_selection_get -displayof $_drop_target -selection XdndSelection -type $type -time $time"
> (procedure "_GetDroppedData" line 28)
> invoked from within
> "_GetDroppedData $time"
> (procedure "tkdnd::xdnd::_HandleXdndDrop" line 24)
> invoked from within
> "tkdnd::xdnd::_HandleXdndDrop 768526336"
>
> Then I tried with DND_Text:
>
> package require tkdnd
> tkdnd::drop_target register . DND_Text
> bind . <<Drop>> {puts %D; list copy}
>
> and this time no errors were raised, but the even handler was not called almost at all - I managed to get it colled once per 10-20 drops of text. Then after few more drops I closed "." window and I had to wait couple of seconds for application to exit - then it crashed with Segmentation Fault.
>
> Can I help you somehow? Can I debug it somehow? I'm using ix86 binary from SF downloads.
>
> Regards,
> Pawel
>


Does it help if you click on the Tk window after the drop?

To say the truth, I haven't yet checked why these events are missed, I
have been somewhat busy with apache rivet :-)

George

Reply With Quote
  #6 (permalink)  
Old 07-13-2012, 04:44 PM
Googie
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

> Does it help if you click on the Tk window after the drop?
>

Indeed it does! Works every time.

> To say the truth, I haven't yet checked why these events are missed, I
> have been somewhat busy with apache rivet :-)


I didn't know you're involved in that project. What ya cookin' there? New features, or bug fixing?

Cheers,
Googie
Reply With Quote
  #7 (permalink)  
Old 07-13-2012, 05:51 PM
Georgios Petasis
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Στις 13/7/2012 19:44, ο/η Googie *γραψε:
>> Does it help if you click on the Tk window after the drop?
>>

> Indeed it does! Works every time.


I know. It seems that Tk needs to be somehow "waken up" to process the
events. I haven't located why this is happening yet.

Have you also tested dragging from Tk to other GTK/Qt apps?

>
>> To say the truth, I haven't yet checked why these events are missed, I
>> have been somewhat busy with apache rivet :-)

>
> I didn't know you're involved in that project. What ya cookin' there? New features, or bug fixing?


No, I am not involved in the project, I am trying to use it. And so far
I am impressed with it. I have written a small web service used by a
small web app, and the service is really fast.

George
Reply With Quote
  #8 (permalink)  
Old 07-13-2012, 06:52 PM
Christian Gollwitzer
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Am 13.07.12 19:51, schrieb Georgios Petasis:
> Στις 13/7/2012 19:44, ο/η Googie *γραψε:
>>> Does it help if you click on the Tk window after the drop?
>>>

>> Indeed it does! Works every time.

>
> I know. It seems that Tk needs to be somehow "waken up" to process the
> events. I haven't located why this is happening yet.
>


Please excuse me that I've not looked into the sources by myself, but
might it be possible to use Tcl_ThreadAlert to wake up Tk's event
processing?

Christian


Reply With Quote
  #9 (permalink)  
Old 07-13-2012, 09:41 PM
Georgios Petasis
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Στις 13/7/2012 21:52, ο/η Christian Gollwitzer *γραψε:
> Am 13.07.12 19:51, schrieb Georgios Petasis:
>> Στις 13/7/2012 19:44, ο/η Googie *γραψε:
>>>> Does it help if you click on the Tk window after the drop?
>>>>
>>> Indeed it does! Works every time.

>>
>> I know. It seems that Tk needs to be somehow "waken up" to process the
>> events. I haven't located why this is happening yet.
>>

>
> Please excuse me that I've not looked into the sources by myself, but
> might it be possible to use Tcl_ThreadAlert to wake up Tk's event
> processing?
>
> Christian
>
>


I have tried to add calls to Tcl_ThreadAlert(), but it didn't improve
things much. XFlush(display) seem to help more.

I have kept these calls to the sources though...

George

Reply With Quote
  #10 (permalink)  
Old 07-14-2012, 05:48 AM
Googie
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

> Have you also tested dragging from Tk to other GTK/Qt apps?

Just did so. It works like a charm with a DND_Text. I tried Qt, GTK and OpenOffice (not sure what toolkit it uses).

I'm not sure how am I suppose to do it with DND_File. It would be great to have it described in the manual as well (I refer to this one http://www.ellogon.org/petasis/tcltk...tkdnd-man-page ).
I also miss description of what do "copy, move, link, ask, private and refuse_drop" mean. What happens if I provide "copy" and what if "private", etc.
Although I realize that writing docs isn't the most exciting thing to do.

Regards,
Pawel
Reply With Quote
  #11 (permalink)  
Old 07-14-2012, 01:21 PM
Georgios Petasis
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

Στις 14/7/2012 08:48, ο/η Googie *γραψε:
>> Have you also tested dragging from Tk to other GTK/Qt apps?

>
> Just did so. It works like a charm with a DND_Text. I tried Qt, GTK and OpenOffice (not sure what toolkit it uses).
>
> I'm not sure how am I suppose to do it with DND_File. It would be great to have it described in the manual as well (I refer to this one http://www.ellogon.org/petasis/tcltk...tkdnd-man-page ).
> I also miss description of what do "copy, move, link, ask, private and refuse_drop" mean. What happens if I provide "copy" and what if "private", etc.
> Although I realize that writing docs isn't the most exciting thing to do.
>
> Regards,
> Pawel
>


I have added a small tutorial:

http://wiki.tcl.tk/36708

If you have any questions, or you want anything to be further clarified,
you can ask it here, so as to update the tutorial.

George

Reply With Quote
  #12 (permalink)  
Old 07-14-2012, 02:31 PM
Gerald W. Lester
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

On 7/14/12 8:21 AM, Georgios Petasis wrote:
> Στις 14/7/2012 08:48, ο/η Googie *γραψε:
>...
>
> I have added a small tutorial:
>
> http://wiki.tcl.tk/36708
>
> If you have any questions, or you want anything to be further clarified, you
> can ask it here, so as to update the tutorial.


George,

You may want to consider moving to Fossil and hosting at core.tcl.tk (and
mirror at chiselapp.com) -- then you get a source control system, bug
tracking system and wiki all for the price of one.

Just a thought.

--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald.Lester@kng-consulting.net |
+------------------------------------------------------------------------+



Reply With Quote
  #13 (permalink)  
Old 07-14-2012, 07:48 PM
quiet_lad
Guest
 
Posts: n/a
Default Re: ANNOUNCE: TkDND 2.5

On Tuesday, June 19, 2012 3:39:03 AM UTC-7, Georgios Petasis wrote:
> I am pleased to announce version 2.5 of the TkDND extension.
>
> What is new in TkDND 2.5?
> --------------------------------------------------
>
> 1) Improved support for accepting drops under Linux.
>
> 2) Added support for dragging under Linux.
>
> 3) Fixes for the CF_HDROP type under Windows.
>
> 4) A new cross-platform type (DND_Color) for transferring colors.
> Currently available only under UNIX (XDND protocol).
>
> This is the first TkDND 2.x release that has support for both dragging
> and dropping under all 3 major operating systems (Windows, OS X, Linux).
>
> A detailed change log can be found here:
>
> http://tkdnd.svn.sourceforge.net/vie...og?revision=78
>
> What is TkDND?
> --------------------------------------------------
> TkDND is a binary extension for Tk, which adds native drag &amp; drop
> capabilities to the Tk toolkit. It can be used with any Tk version equal
> or greater to 8.3.3 and currently only the UNIX (X-Windows), Microsoft
> Windows (XP, Vista, 7) and OS X (Leopard) operating systems are
> supported (Tk 8.6 is required for OS X).
>
> The project home page, including documentation, examples and download
> links, can be found at:
>
> https://sourceforge.net/projects/tkdnd/
>
> http://www.ellogon.org/petasis/tcltk-projects/tkdnd
>
> How to get it?
> --------------------------------------------------
> TkDND can be downloaded from the following locations:
>
> Sources:
> http://sourceforge.net/projects/tkdn...ar.gz/download
>
> Windows 32bit Binaries:
> http://sourceforge.net/projects/tkdn...6.zip/download
>
> Windows 64bit Binaries: -
>
> Linux 32bit Binaries:
> http://sourceforge.net/projects/tkdn...ar.gz/download
>
> Linux 64bit Binaries:
> http://sourceforge.net/projects/tkdn...ar.gz/download
>
> OS X 10.7.3 64bit Binaries: -
>
> All files: https://sourceforge.net/projects/tkdnd/files/
>
> George Petasis


Gosh I thought you hasd programmed advanced dungeons and dragons into tcl with atuomated character generators.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 12:03 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.