summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>1999-08-09 16:52:06 (GMT)
committerhobbs <hobbs@noemail.net>1999-08-09 16:52:06 (GMT)
commit961a6ba6f98f8f6bbb1f1654697976bd4771cc6d (patch)
treef060237106a1a4defd9d5b17e9d60637f751f2c2 /library/entry.tcl
parent61ae0960b26b8f0e298e36da6f1af9f95f0431ac (diff)
downloadtk-961a6ba6f98f8f6bbb1f1654697976bd4771cc6d.zip
tk-961a6ba6f98f8f6bbb1f1654697976bd4771cc6d.tar.gz
tk-961a6ba6f98f8f6bbb1f1654697976bd4771cc6d.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] FossilOrigin-Name: dcc927a5b91c3133221c88cbb26843d1cce883c1
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>> {