Sujet : Re: How to set ttk::radiobutton -variable to an object's instance variable?
De : m.n.summerfield (at) *nospam* gmail.com (Mark Summerfield)
Groupes : comp.lang.tclDate : 14. Jul 2025, 10:00:32
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1052gvg$3aoa5$1@dont-email.me>
References : 1 2 3 4
User-Agent : Pan/0.154 (Izium; 517acf4)
On Fri, 11 Jul 2025 21:12:08 +0200, Schelte wrote:
On 11/07/2025 17:21, Mark Summerfield wrote:
That silently didn't work.
Then you have a bug somewhere in the code you didn't show, because [my
varname ShowState] correctly produces the fully qualified name of the
instance variable.
Another way to get the fully qualified name of the variable is
[namespace which -variable ShowState]. But as that produces the same
result, it also won't work until you fix that other bug.
Schelte.
Thank you (and the others) for your help.
The mistake I made was that I initialized the variable in the wrong place.
Now I call `set ShowState asis` in the constructor and use
`-variable [my varname ShowState]` and it all works fine.
When I looked at the docs for `my` I couldn't find `varname` but now
realise this is documented on the `oo::object` page.