perlquestion
glenn
<p>How to get TK widget option to accept variable reference? I need to use this in more than one place and it's not an option to store the button in the hashref as this hashref will be updated by other clients.</p>
<readmore>
<code>
use Tk;
$mw = MainWindow->new();
my $system = {};
$system->{blink}->[0] = "disabled";
#works but does not update as value in hashref changes
my $but = $mw->Button(-text=>"Blink Unit", -state=>$system->{blink}->[0])->pack();
#does not work as state will not accept variable reference
#my $but = $mw->Button(-text=>"Blink Unit", -state=>\$system->{blink}->[0])->pack();
=pod
*$but->{'Configure'}->{'-state'} = \$system->{blink}->[0]; #overwrite the location of the value??
=cut
</code>
</readmore>