diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-31 20:05:36 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-31 20:05:36 (GMT) |
commit | 10c86811d11ab892d38928f353575afb5875ab88 (patch) | |
tree | cadcfe64ebdcfac5542d2b6420a857f3eb8c849e /ds9/library/util.tcl | |
parent | 5ef46e82c2166227ec7966c6844f9da625bc9a7b (diff) | |
download | blt-10c86811d11ab892d38928f353575afb5875ab88.zip blt-10c86811d11ab892d38928f353575afb5875ab88.tar.gz blt-10c86811d11ab892d38928f353575afb5875ab88.tar.bz2 |
update ds9 parsers
Diffstat (limited to 'ds9/library/util.tcl')
-rw-r--r-- | ds9/library/util.tcl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index 6ac644b..bd27680 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -167,7 +167,6 @@ proc UpdateMain {} { } proc ProcessCmdSet {varname key value {cmd {}}} { - upvar #0 $varname var global $varname set ${varname}($key) $value @@ -176,6 +175,16 @@ proc ProcessCmdSet {varname key value {cmd {}}} { } } +proc ProcessCmdCVAR {which value {cmd {}}} { + global cvarname + upvar #0 $cvarname cvar + + set cvar($which) $value + if {$cmd != {}} { + eval $cmd $cvarname + } +} + proc ProcessSendCmdGet {varname key} { upvar #0 $varname var global $varname |