Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: TkxTables within a TkxTable

by Anonymous Monk
on Jun 20, 2015 at 07:34 UTC ( [id://1131242] : note . print w/replies, xml ) Need Help??


in reply to TkxTables within a TkxTable

Not sure what I have got wrong but there seems limited information on the www and the man pages don't seem to cover this scenario

Without scrutiny of the code I'm going to say its your typical coping with scoping Tk issue :) read all about it see write Tk callbacks all lexically scoped and not-memory leaking with no nested subs ever :) avoid nested subs and closures because nested named subs because they're closures

update: I ran the program, yup, exactly as I figured , tk scoping issue, tk closures people, Re: TK Submenus (Tk::Menu , global variables/ spirit of strict), tk scoping function argument passing, can't share Tk mainwondow between threads

update: I've read the program, here is a fix, add this one line

for (my $m = 1; $m <=12; $m++) { my %hash = %hash; ## poor name

The deal is, you can't share the same variable between 12 different calendars ... you need 12 different variables

And now for a message about Tkx (the questions are rhetorical :):

Why are you using Tkx? Did you know that Tk is available via ppm? There is no reason to switch to Tkx voluntarily.

Also :)Tkx is the worst possible option