Thank you very much for your reply! I am ageing but can still read well :-))

Thank you for the hints to the other Tk modules too. I will certainly read the documentation.

The posted "minimal example" is a part of a bigger application, I just did not change the menu portion here.

The simple sort in the real application is actually performed per mouse click on the column header. The menu is for the advanced sort, that is on column1 then on column2 then on column3 (there are more than 3 columns in the real application too). This intention is not obvious with the short test file provided, I admit. I should make many Harrys with different dates to show that.

Probably I did not describe the actual problem sufficiently. It is as follows. If I start the dialog where the user choose the columns to sort on, the entries should be empty. They are empty in v.5.16 but are partially set in v.5.26 and I do not understand why.

Thanks again!

Update: Just thought - probably your example behaves differently in v.5.16 and v.5.26 too? Cannot check it now (have only 5.16 here), will do it @home and report.

Update 2: Now @home I run your example with v.5.16 and v.5.26 and I do see different behaviour. Whereas under v.5.16 the BrowseEntry always start with "inits", it starts sometimes with "inits" and sometimes with 1 under v.5.26 (I have to start skript more times in sequence to see this effect).

So, first I learned that the minimal working example can be really small. :-) Thank you very much again, also for the hints about the other modules.

Second, however, I see that this different behaviour is not just me. I would like to understand why. Is it something I should worry about?

Update 3: I added two print statements to your example: print "Debug1: $init\n"; straight after $db->BrowseEntry(-variable, \$init, -choices, \@choices,)->pack; and print "Debug2: $init\n"; straight after $db->Show;. Under v.5.16 the output is always Debug1: inits for the first print statement and the chosen value for the second print statement. Unter v.5.26 the first print statement is sometimes Debug1: inits and sometimes Debug1: 1. The second print statement is the same way as under v.5.16. Still curious, why $init is set to the first value of @choices under v.5.26 and also not always but somehow randomly.


In reply to Re^2: Different behavior of Tk program in two versions of Perl by vagabonding electron
in thread Different behavior of Tk program in two versions of Perl by vagabonding electron

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.