in reply to perl/Tk Problem with referenced variable in Entry
Looks like when the toplevel gets destroyed, the window{xAf} gets grinitialigzed to 0 under some circumstances ... probably a bug since as choroba shows stringification gives the correct value
This might be a bug worth reporting to the maintainer, rt://Tk
However, creating a Dialog instead of a toplevel naturally works as intended
sub roomSub { if (! Exists ($roomTl)) { warn "textvariable"; #~ $roomTl = $mw->Toplevel(); $roomTl = $mw->Dialog(); $roomTl->Entry( -textvariable => \$window{xAf}, )->pack(-fill => 'x'); } $roomTl->Show(); }
Also, I won't bug you about tk scoping function argument passing
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl/Tk Problem with referenced variable in Entry (bug)
by contact@solamen.fr (Novice) on Nov 06, 2013 at 13:06 UTC | |
by choroba (Cardinal) on Nov 06, 2013 at 13:55 UTC |