summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-08-09 16:52:06 (GMT)
committerhobbs <hobbs>1999-08-09 16:52:06 (GMT)
commit1cdd5fb850d1be603e0994761bd0271233c964c4 (patch)
treef060237106a1a4defd9d5b17e9d60637f751f2c2 /library/entry.tcl
parent8cc6723852260c12857f4c3eeff827a2b8d612f6 (diff)
downloadtk-1cdd5fb850d1be603e0994761bd0271233c964c4.zip
tk-1cdd5fb850d1be603e0994761bd0271233c964c4.tar.gz
tk-1cdd5fb850d1be603e0994761bd0271233c964c4.tar.bz2
1999-08-09 Jeff Hobbs <hobbs@scriptics.com>
* library/button.tcl: cleaned up programming (config -> configure) and fixed Windows relief bug [Bug: 664] * library/entry.tcl: changed Entry C/C/P to not use global data (now uses tkPriv(data)) [Bug: 1475] * library/listbox.tcl: fixed extended mode script error [Bug: 866]
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index e7141b1..2bb27c2 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.6 1999/04/16 01:51:26 stanton Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.7 1999/08/09 16:52:06 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -26,22 +26,25 @@
# char, word, or line.
# x, y - Last known mouse coordinates for scanning
# and auto-scanning.
+# data - Used for Cut and Copy
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
# The code below creates the default class bindings for entries.
#-------------------------------------------------------------------------
bind Entry <<Cut>> {
- if {![catch {set data [tkEntryGetSelection %W]}]} {
+ if {![catch {tkEntryGetSelection %W} tkPriv(data)]} {
clipboard clear -displayof %W
- clipboard append -displayof %W $data
+ clipboard append -displayof %W $tkPriv(data)
%W delete sel.first sel.last
+ unset tkPriv(data)
}
}
bind Entry <<Copy>> {
- if {![catch {set data [tkEntryGetSelection %W]}]} {
+ if {![catch {tkEntryGetSelection %W} tkPriv(data)]} {
clipboard clear -displayof %W
- clipboard append -displayof %W $data
+ clipboard append -displayof %W $tkPriv(data)
+ unset tkPriv(data)
}
}
bind Entry <<Paste>> {