in reply to Tk Entry Widgets & Subs
You reference to a freshly created hash, which will be *overwrited* by a next call to your sub. Throw away a line my %objects = %$_objects; Instead write$container -> Entry( -width => $width, -textvariable => \$objects{ +$objkey} ) -> pack( -side => 'right' );
Try to follow which reference to which scalar you want your widget to refer, and you'll understand what I mean$container -> Entry( -width => $width, -textvariable => \$_objects +->{$objkey} ) -> pack( -side => 'right' );
BTW why you're not using just "LabEntry" widget?
Courage, the Cowardly Dog
things, I do for love to perl...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tk Entry Widgets & Subs
by Tanalis (Curate) on Aug 22, 2002 at 06:51 UTC |