http://qs321.pair.com?node_id=1217724


in reply to Re: Different behavior of Tk program in two versions of Perl
in thread Different behavior of Tk program in two versions of Perl

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.