Pupose: Describe features that would be useful in a Tk based clipboard application.
LV Currently I have used a non-Tk application called xclipboard, which provides minimalistic clipping features. The main reason I use it is because a) it is the only thing that comes on my system, b) it allows the user to create new pages for text to be glued in.
One of the major misfeatures of the application is that it does not support the feature of deleting selected text.
What features could a Tk based clipboard application provide? At one time, someone on clt had proposed the idea of filters being defined (sort along the idea of Apple's Data Detectors I guess) which based on the kind of data being selected, could take various actions. These would be written in tcl of course.
(Bryan Oakley says: I was the one proposing the filters, and yes, they were modeled after Apple's data detectors. I have a clipboard watching application that uses them, though I rarely use it. I think it was posted to comp.lang.tcl a while back. SuperClipboard is also availble for download here: [L1 ].)
LES on Oct 12 2003 - Problem: I have a couple of Perl scripts called from a separate quick launch program. I use these scripts as filters. I copy a block of text and launch the script. The script reads the Windows clipboard, parses and changes it and replaces the clipboard with the result of the changes, ready to be pasted over the old stuff. Here is the Perl script:
use Win32::Clipboard; $handle_clipboard = Win32::Clipboard(); $clipboard_content = $handle_clipboard -> Get(); $clipboard_content =~ s/replace this/with that/m while ($clipboard_content =~ m/replace this/m); $clipboard_content = $handle_clipboard -> Set($clipboard_content); exit();
It's very quick and practical. Who needs a GUI for that? But I have found that it is not possible to do the same with Tcl/Tk without at least one text or entry widget so I can actually select the text before copying. The relevant bug-report-slash-feature-request has been submitted at SourceForge.
The problem is also described here: [L2 ].
LVwikignoming - 2010-06-28 08:48:29
In the years since I was commenting on this page, we've changed X servers a couple of times. Now that we are using the cygwin xfree server, I had to stop using xclipboard because it interfered with cygwin's facility to coordinate copy and paste between Windows native clients and X clients. This is a facility that Hummingbird also provided with Exceed.
Recently, a developer reported problems consistently copying between Tk x clients and Windows native clients (such as Word, Internet Explorer, notepad, etc.). Two different issues are seen, at least when using Exceed. There's a bug report that has been opened for the issues [L4 ]. I have tested the small coherent example using Exceed and cygwin x server and was able to reproduce at least one of the two cases regularly. There appears to be some variation on the problem depending on the specifics of the specific x server, version, etc. I have yet to determine what kind of work around might be needed to get consistent behavior.