summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/namespace.n7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/namespace.n b/doc/namespace.n
index 717de11..f89ec91 100644
--- a/doc/namespace.n
+++ b/doc/namespace.n
@@ -7,7 +7,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: namespace.n,v 1.38 2009/11/08 19:56:45 dkf Exp $
+'\" RCS: @(#) $Id: namespace.n,v 1.39 2009/12/27 22:06:12 dkf Exp $
'\"
.so man.macros
.TH namespace n 8.5 Tcl "Tcl Built-In Commands"
@@ -693,11 +693,12 @@ may be imported by other namespaces.
If a \fBnamespace import\fR command specifies a command
that is not exported, the command is not imported.
.SH "SCOPED SCRIPTS"
+.PP
The \fBnamespace code\fR command is the means by which a script may be
packaged for evaluation in a namespace other than the one in which it
was created. It is used most often to create event handlers, Tk bindings,
and traces for evaluation in the global context. For instance, the following
-code indicates how to direct a variable trace callback into the current
+code indicates how to direct a variable \fBtrace\fR callback into the current
namespace:
.PP
.CS
@@ -708,7 +709,7 @@ namespace:
puts "the value of $n1 has changed to $var"
return
}
- trace variable b w [\fBnamespace code\fR theTraceCallback]
+ trace add variable b write [\fBnamespace code\fR theTraceCallback]
}
set a::b c
.CE