summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/tk.tcl37
1 files changed, 21 insertions, 16 deletions
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.