summaryrefslogtreecommitdiff
path: root/itcl/itcl/library/itcl.tcl
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-09-24 22:42:36 +0000
committerKeith Seitz <keiths@redhat.com>2002-09-24 22:42:36 +0000
commit5a88d945c95d8c15e31bf74fc9850b8c01fdeaec (patch)
tree63e9dde7c1e979d6e7664c336c67ed8291baa9ad /itcl/itcl/library/itcl.tcl
parentc2e8768187b8a0373793db9afd305d89d09de3a3 (diff)
downloadgdb-5a88d945c95d8c15e31bf74fc9850b8c01fdeaec.tar.gz
import itcl 3.2.1ITCL_3_2_1
Diffstat (limited to 'itcl/itcl/library/itcl.tcl')
-rw-r--r--itcl/itcl/library/itcl.tcl41
1 files changed, 18 insertions, 23 deletions
diff --git a/itcl/itcl/library/itcl.tcl b/itcl/itcl/library/itcl.tcl
index 3a8e54c3b22..78cb48abe96 100644
--- a/itcl/itcl/library/itcl.tcl
+++ b/itcl/itcl/library/itcl.tcl
@@ -16,6 +16,10 @@
# See the file "license.terms" for information on usage and
# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+proc ::itcl::delete_helper { name args } {
+ ::itcl::delete object $name
+}
+
# ----------------------------------------------------------------------
# USAGE: local <className> <objName> ?<arg> <arg>...?
#
@@ -31,7 +35,7 @@ proc ::itcl::local {class name args} {
uplevel [list set itcl-local-$ptr $ptr]
set cmd [uplevel namespace which -command $ptr]
uplevel [list trace variable itcl-local-$ptr u \
- "itcl::delete object $cmd; list"]
+ "::itcl::delete_helper $cmd"]
return $ptr
}
@@ -109,15 +113,6 @@ foreach cmd {public protected private} {
}
}
-# CYGNUS LOCAL
-# This version of auto_import does not work, because it relies
-# WHOLLY on the tclIndex files, but the tclIndex files have no
-# notion of what the export list for a namespace is. So at the
-# time you do "namespace import" the export list is empty, and
-# so nothing is imported.
-# Until that is fixed, it is best just to go back to the original
-# Tcl version of auto_import...
-
# ----------------------------------------------------------------------
# auto_import
# ----------------------------------------------------------------------
@@ -131,19 +126,19 @@ foreach cmd {public protected private} {
# pattern The pattern of commands being imported (like "foo::*")
# a canonical namespace as returned by [namespace current]
-#proc auto_import {pattern} {
-# global auto_index
+proc auto_import {pattern} {
+ global auto_index
-# set ns [uplevel namespace current]
-# set patternList [auto_qualify $pattern $ns]
+ set ns [uplevel namespace current]
+ set patternList [auto_qualify $pattern $ns]
-# auto_load_index
+ auto_load_index
-# foreach pattern $patternList {
-# foreach name [array names auto_index $pattern] {
-# if {"" == [info commands $name]} {
-# ::itcl::import::stub create $name
-# }
-# }
-# }
-# }
+ foreach pattern $patternList {
+ foreach name [array names auto_index $pattern] {
+ if {"" == [info commands $name]} {
+ ::itcl::import::stub create $name
+ }
+ }
+ }
+}