I'm writing this program in Perl/Tk and I need to be able to pass a top-level widget to a function. Here is an example of what I mean:
sub start {
my $mw = MainWindow->new;
my $button = $mw->Button(-text=>"Go To Foo", -command => sub {foo($mw);})->pack;
}
sub foo {
my ($parent) = @_;
my...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.