On 16/07/2009 4:50 PM, Sylvain Thibault wrote:
This is probably trivial... :-)
How do you retrieve a value from a -variable ref ?

$fr->new_ttk__radiobutton(-text => 'Clipboard Space', -variable => \$clip_format, 
-value => 'SP' )...
(...)
my $rb = shift @c;
my $w = Tkx::widget->new($rb);
my $label = $w->cget(-text);
my $var_ref = $w->cget(-variable);

$var_ref is now: ::perl::SCALAR(0x69b8274)

How do I get the value of $clip_format ?

It's in $clip_format, the scalar var. The ::perl::SCALAR(0x69b8274) is the varname in Tcl if you wanted to access it from Tcl, but $clip_format itself has the value.

Jeff

Reply via email to