TIP #370: EXTEND TK'S SELECTION WITH A -TIME OPTION ===================================================== Version: $Revision: 1.3 $ Author: George Petasis State: Draft Type: Project Tcl-Version: 8.7 Vote: Pending Created: Wednesday, 04 August 2010 URL: https://tip.tcl-lang.org370.html Post-History: ------------------------------------------------------------------------- ABSTRACT ========== This TIP proposes the addition of a new argument to the Tk command *selection*, for specifying a timestamp that should be used in order to retrieve a selection. RATIONALE =========== TkDND 2.x always used the *selection* command to retrieve data from the clipboard, and worked until recently. The problem seems to be that the selection Tk command always uses "/CurrentTime/" while retrieving the selection, while the XDND protocol specifies that a specific timestamp should be used. I see that in Tk sources (/unix/tkUnixSelect.c/, line 178, the call to /XConvertSelection/) there is already some discussion in the comments which timestamp should be used. The "/CurrentTime/" seems a good choice, but why not offer the ability to provide a timestamp if needed? PROPOSED CHANGE ================= Add a new option to *selection get*. Something like this: *selection get* ?*-displayof* /window/? ?*-selection* /selection/? ?*-type* /type/? ?*-time* /time/? The /time/ value will be an integer, the same as in the *-time* option to *event generate* and as produced by the *%t* substitution in *bind*. COPYRIGHT =========== This document has been placed in the public domain. ------------------------------------------------------------------------- TIP AutoGenerator - written by Donal K. Fellows