summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-05-20 13:59:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-05-20 13:59:01 (GMT)
commit23ed65866c66fe8ecb9291e59cab065483b05323 (patch)
tree8c321a523c5bd2ba306d8228812e4634967ba89a
parent452f22a126b71f05b997a5530fc837b9348bfdba (diff)
downloadtk-23ed65866c66fe8ecb9291e59cab065483b05323.zip
tk-23ed65866c66fe8ecb9291e59cab065483b05323.tar.gz
tk-23ed65866c66fe8ecb9291e59cab065483b05323.tar.bz2
* A little namespace cleanup on Daniel Steffen's
latest revisions to avoid defining new global commands.
-rw-r--r--ChangeLog5
-rw-r--r--library/tk.tcl37
2 files changed, 26 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index c1a6130..fe266b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-20 Don Porter <dgp@users.sourceforge.net>
+
+ * library/tk.tcl: A little namespace cleanup on Daniel Steffen's
+ latest revisions to avoid defining new global commands.
+
2002-05-20 Daniel Steffen <das@users.sourceforge.net>
* mac/tkMacInit.c:
diff --git a/library/tk.tcl b/library/tk.tcl
index 7665e6f..679b786 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.39 2002/05/20 10:21:28 das Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.40 2002/05/20 13:59:02 dgp Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -380,25 +380,30 @@ switch $::tcl_platform(platform) {
if {$::tk_library ne ""} {
if {[string equal $tcl_platform(platform) "macintosh"]} {
- proc sourceLibFile {file} {
- if {[catch {uplevel #0 [list source [file join $::tk_library \
- $file.tcl]]}]} {uplevel #0 [list source -rsrc $file]}
+ proc ::tk::SourceLibFile {file} {
+ if {[catch {
+ namespace eval :: \
+ [list source [file join $::tk_library $file.tcl]]
+ }]} {
+ namespace eval :: [list source -rsrc $file]
+ }
}
} else {
- proc sourceLibFile {file} {
- uplevel #0 [list source [file join $::tk_library $file.tcl]]
+ proc ::tk::SourceLibFile {file} {
+ namespace eval :: [list source [file join $::tk_library $file.tcl]]
}
}
- sourceLibFile button
- sourceLibFile entry
- sourceLibFile listbox
- sourceLibFile menu
- sourceLibFile panedwindow
- sourceLibFile scale
- sourceLibFile scrlbar
- sourceLibFile spinbox
- sourceLibFile text
- rename sourceLibFile {}
+ namespace eval ::tk {
+ SourceLibFile button
+ SourceLibFile entry
+ SourceLibFile listbox
+ SourceLibFile menu
+ SourceLibFile panedwindow
+ SourceLibFile scale
+ SourceLibFile scrlbar
+ SourceLibFile spinbox
+ SourceLibFile text
+ }
}
# ----------------------------------------------------------------------
# Default bindings for keyboard traversal.