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
In reply to Re: perl/Tk Problem with referenced variable in Entry (bug)
by Anonymous Monk
in thread perl/Tk Problem with referenced variable in Entry
by contact@solamen.fr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |