summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authordas <das@noemail.net>2002-05-20 10:21:20 (GMT)
committerdas <das@noemail.net>2002-05-20 10:21:20 (GMT)
commita1ac44f2a1c3ccd455e1d9feb856dc5a18703deb (patch)
tree0d35ec4a5ca8dba679583aae69e68439beca6f7a /library/tk.tcl
parent6c61f4d0d0fcb7e319e99e73da1e1440a22a2160 (diff)
downloadtk-a1ac44f2a1c3ccd455e1d9feb856dc5a18703deb.zip
tk-a1ac44f2a1c3ccd455e1d9feb856dc5a18703deb.tar.gz
tk-a1ac44f2a1c3ccd455e1d9feb856dc5a18703deb.tar.bz2
* mac/tkMacInit.c:
* library/console.tcl: * library/tk.tcl: fix tk.tcl not sourcing library files that define bindings at startup on mac. (independent of tk library files being in resources or on auto_path) FossilOrigin-Name: 31190a2dda4aff4b73976e5e95bf0c3caf161077
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl33
1 files changed, 22 insertions, 11 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index 4e1cb87..7665e6f 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.38 2002/04/29 13:17:44 bagnonm Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.39 2002/05/20 10:21:28 das Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -378,16 +378,27 @@ switch $::tcl_platform(platform) {
# Read in files that define all of the class bindings.
# ----------------------------------------------------------------------
-if {$::tcl_platform(platform) ne "macintosh" && $::tk_library ne ""} {
- source [file join $::tk_library button.tcl]
- source [file join $::tk_library entry.tcl]
- source [file join $::tk_library listbox.tcl]
- source [file join $::tk_library menu.tcl]
- source [file join $::tk_library panedwindow.tcl]
- source [file join $::tk_library scale.tcl]
- source [file join $::tk_library scrlbar.tcl]
- source [file join $::tk_library spinbox.tcl]
- source [file join $::tk_library text.tcl]
+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]}
+ }
+ } else {
+ proc sourceLibFile {file} {
+ uplevel #0 [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 {}
}
# ----------------------------------------------------------------------
# Default bindings for keyboard traversal.