namespace which -variable A(1)
Closed / Duplicate3086734fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-10-13 15:41:27
"namespace which -variable" is handy to reference variables and works intuitive for non-arrays:
% namespace eval ns { set v 1 }
% namespace eval ns { checkbutton .c -variable [namespace which -variable v] }
With tcl 8.5, to acheve the same with array members, the solution is not so intuitive:
% namespace eval ns { set A(1) B }
% namespace eval ns { checkbutton .d -variable [namespace which -variable A](1) }
Would it possible to also allow:
% namespace eval ns { checkbutton .d -variable [namespace which -variable A(1)] }
At the moment "namespace which -variable arr(ind)" returns the empty string and thus, the above does not work.
msoferplain2010-10-13 22:45:12
Dup of #472113
msoferplain2010-10-13 22:45:13
allow_comments - 1
Log in (anonymous is fine) to add a comment.