home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
mac
/
exsource.old
/
14_4.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
305b
|
17 lines
#
# Example 14-4
# The code procedure to wrap callbacks.
#
proc code {args} {
set namespace [uplevel {namespace current}]
return [list namespace inscope $namespace $args]
}
namespace eval foo {
variable y "y value" x {}
set callback [code set x $y]
#=> namespace inscope ::foo {set x {y value}}
}