|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
Στις 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 |
|
|||
|
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 |
|
|||
|
Στις 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 |
|
|||
|
> 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 |
|
|||
|
Στις 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 |
|
|||
|
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 |
|
|||
|
Στις 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 |
|
|||
|
> 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 |
|
|||
|
Στις 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 |
|
|||
|
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 | +------------------------------------------------------------------------+ |
|
|||
|
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 & 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. |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|