From: <no...@so...> - 2002-08-07 20:13:26
|
Bugs item #472113, was opened at 2001-10-17 12:41 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=472113&group_id=10894 Category: 20. [namespace] Group: None Status: Open Resolution: None Priority: 5 Submitted By: Bruce Hartweg (hartweg) Assigned to: miguel sofer (msofer) Summary: [namespace which -var] fails for ary(i) Initial Comment: [namespace which -variable ary(i)] returns a null string even when ary(i) exists! This is a major pain when trying to get fully scoped variable names to give to widgets. Here is a script snippet that shows the eror: ---------------------------------------------------------------------- >Comment By: miguel sofer (msofer) Date: 2002-08-07 17:13 Message: Logged In: YES user_id=148712 (1) Sorry, this bug somehow flew under my horizon :( (2) It's not so clear to me what the correct fix would be: what should happen if the array itself exists, but the array element does not? In your script, what is the expected result of adding a line puts "4 - [namespace which -variable ary(k)]" According to the man page, the return should be "" - is this what you're expecting? (3) Depending on the answer to (2), a workaround involving [info exists] may be the solution for now. ---------------------------------------------------------------------- Comment By: Bruce Hartweg (hartweg) Date: 2001-10-17 12:58 Message: Logged In: YES user_id=338658 Got submitted to quick... namespace eval a { variable ary set ary(i) v puts "1 - [namespace which -variable ary]" set x ary set y ary(i) puts "2 - [namespace which -variable $x]" puts "3 - [namespace which -variable $y]" } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=472113&group_id=10894 |