in reply to Re: tk form textvariables
in thread tk form textvariables

tried your version but still seems to need the configure and update to work... here is the actually version ( %CURRENT is a globel variable that holds all the form variables
$frm_current->BrowseEntry( -variable => \$CURRENT{PLATFORM_FIELD}, -width => 11, -font => $font, -background => $bgColor, -state => 'normal', -choices => [@PLATFORM_LIST] ), #etc ... sub displayFeed { # $path is from a Hlist path which is the key into hash my $path = shift; my %C = %{$FEEDS{$path}{formFields}}; # checked %C and %CURRENT and all values are present # after this loop for ( keys %C ){ $CURRENT{$_} = $C{$_}; } # still no update of the form after this update $mw->update; return
Do I have to do the configure and update for every form field or am I still missing something ? I am just trying to create an easy way to store/recall and redisplay form fields. I am sure that this is a common problem with a well known solution. Am I taking the right track?

Replies are listed 'Best First'.
Re^3: tk form textvariables
by hangon (Deacon) on Mar 03, 2009 at 18:42 UTC

    Try using a hash reference:

    my %CURRENT = (PLATFORM_FIELD => ... my $hashref = \%CURRENT; ... $frm_current->BrowseEntry( -variable => \$hashref->{PLATFORM_FIELD}, -width => 11, -font => $font, -background => $bgColor, -state => 'normal', -choices => [@PLATFORM_LIST] ),
Re^3: tk form textvariables
by liamlrb (Acolyte) on Mar 03, 2009 at 17:24 UTC
    Well I know yours works so I will start looking at any differences I can find.. thanks again