Re: interaction of global and rename
- From: stephanearnold@xxxxxxxx
- Date: 9 Sep 2006 00:09:45 -0700
Paul Nash a écrit :
I am using configuration files where each item is a command using a
procedure [ps]
proc colorscheme scheme {
global Config
# redefine proc ps
if { [ info proc psold2] == {} } {rename ps psold2}
proc ps {tag options} {
...
}
...
}
Now [colorscheme] is executed in the context of a parent config file with a
line this:
ps -colorscheme [colorscheme greyblue]
Further, [colorscheme] is called before [ps] in this command.
(because of the rules of tcl)
The execution stack is :
- execute [colorscheme greyblue] which change the
body of [ps]
- replace this call by its return value
- execute the new ps via [ps -colorscheme <value>]
This may have unexpected side-effects.
Cheers,
Stéphane
.
- References:
- interaction of global and rename
- From: Paul Nash
- interaction of global and rename
- Prev by Date: Re: freeWrap 6.2 not searching auto_path for Tile?
- Next by Date: Regular expresion and updating the -state option.
- Previous by thread: Re: interaction of global and rename
- Next by thread: ANN: Tkhtml3 Alpha 10
- Index(es):