in reply to tie variable
#!/usr/bin/perl -- use strict; use warnings; use Tk; use Tk::Trace; my $mw = tkinit; my $tv = "yo"; my $tt = $mw->Entry( )->pack; $tt->configure( -textvariable , \$tv ); $mw->traceVariable( \$tv, 'w' => [ sub { warn "you changed it @_ "; $ +_[1]; } ] ); $mw->after( 1000 => sub { $tv.= ' '.rand.' '; } ); $mw->MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: tie variable
by grasshopper!!! (Beadle) on May 30, 2015 at 15:09 UTC |