Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[my varname] not working with array

Closed / Fixed2883857fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-10-22 11:47:44
In order to use object member variable in widget, we need to use [my varname] to get fully qualified variable name.
But this method does not work with array index:

     ttk::entry $path.entry -textvariable [my varname myVar(index)]

Even worth, [my varname myVar(index)] does not return an error, but an empty string.
Also, the only working alternative is ugly:
     ttk::entry $path.entry -textvariable [my varname myVar](index)

I would like to have [my varname myVar(index)] to work, or at least [my varname varName ?index?]
dkfplain2009-10-22 22:41:02
Fixed in 8.6; need backport to package.
dkf Ticket [2883857fff]: 1 change [History diff]2009-10-22 22:41:03
dkfplain2009-10-23 02:12:00
Fixed in TclOO package too.
dkfplain2009-10-23 02:12:01
allow_comments - 1
Log in (anonymous is fine) to add a comment.