Esteemed monks,
I have a Perl/Tk application (which many here have helped with!) where I face an interesting dilemna.
$pgl->Label(-text => 'Project', -justify => 'right', -width => '20
+')
->grid($pr_list = $pgl->BrowseEntry(-variable => \$state->
+{prSrcName}, -browsecmd => \&doGetProject, -listcmd => [ \&doLoadPr,
+$dbh, $pr_list ], -width => '20'), -sticky => 'w', -pady => '20');
In this code I wish to 'load' the list by calling a sub when the 'arrow' button is clicked. Naturally I would like to pass the variables in to the sub. But before the sub can know where to 'insert' the data it must have the handle for the widget! Now this is a case of the dog chasing its tail. I can't use the handle in the call to the sub till it has a value.
So, is it possible to pass the widget handle to a sub, from the the widget?
I know I can do it by making the widget handle a global, but hey I just don't wanna go down that road if I can avoid it.
jdtoronto