I wrote a tk app that uses a hash to store all the -textvariable variables in the form ( eg -textvariable => \$CURRENT{form_field_name}. I use "store"/retrieve from the storable module to save, recall the hash when I want to redisplay the saved form, The problem is when recalled, nothing shows up in the form...

The hash used to store the form textvariable has the same address as the one I restore to and I can see the correct values in the hash but nothing updates in the form. My understanding is that it should be instantaneous when the textvariable is changed?
$e_pilot = $frm_current->Entry( -textvariable => \$CURRENT{PILOT_FIELD}, )->pack(); store(%\CURRENT, "FEED_FILE"); ... $f = retrieve('FEEDS_FILE') or warn "unable to retrieve FEEDS from FEE +D_FILE$! \n" unless defined $f; %CURRENT = %{$f};
The addresses of %CURRENT stored from and retrieved to are the same, the $CURRENT{PILOT_FIELD} has the correct data, but nothing is displayed in the form.

I was able to get it to display by

$e_cs_search->configure( -textvariable=>\$CURRENT{PILOT_FIELD} + ); $mw->update;
but I shouldn't have to right ?????

thanks for any insights

Liam

In reply to tk form textvariables by liamlrb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.