use Tk; use strict; use warnings; my $mw = MainWindow->new(); for my $id (0 .. 3) { $mw->Button( text => "Button$id", command => sub { pub($id) } )->pack(); } MainLoop; sub pub { my $task_id = shift; print "task id = $task_id\n"; }
In reply to Re: Quick question about Tk(?)
by Arunbear
in thread Quick question about Tk(?)
by pg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |