in reply to Re: TK "textvariable" not updating with @var but ok with $var
in thread TK "textvariable" not updating with @var but ok with $var

Thank you! I will try to leave that line out and debug more. (I don't 'completely' understand yet, But I get the basic of what you are saying.) Again Thanks -Mark
  • Comment on Re^2: TK "textvariable" not updating with @var but ok with $var

Replies are listed 'Best First'.
Re^3: TK "textvariable" not updating with @var but ok with $var
by mark4 (Acolyte) on Jan 27, 2017 at 00:49 UTC
    I also see that my sobroutine change_var1_1 has the line  @var1 = change_var1_2(@var1); in it. As I see from debug, this is also disconnecting the array. Perhaps for my (better) understanding you could sugest a different was to assign the @var1 array without having it get disconnected?
      This worked.
      sub change_var1_1 { my $i; my @foo = change_var1_2(@var1); for ($i = 1; $i <= 81; $i++) { $var1[$i] = $foo[$i]; } $status = "change_var1_1 called $var1[3], $var1[5]"; }
      As we know this isn't working...
      sub change_var1_1 { @var1 = change_var1_2(@var1); $status = "change_var1_1 called $var1[3], $var1[5]"; }
      Is there a better way? Should I just not be using arrays in the textvariables? i.e.  -textvariable => \$puz[25]

        sub change_var1_1 { change_var1_2(\@var1); $status = "change_var1_1 called $var1[3], $var1[5]"; } sub change_var1_2 { my $var=shift; $var->[3] = 6; $status = "change_var1_2 called $var->[3]"; }