Subject: | {Value} for Checkbuttons - Found a difference with new tk and checkbutton |
Date: | Tue, 23 Dec 2003 11:39:44 +0000 |
To: | bug-Tk [...] rt.cpan.org |
From: | smackdab <smackdab949 [...] yahoo.com> |
This example from Marc's post (sometime ago)
no longer works. The docs still say that
{Value} should be valid
(and I hope it will be or I need a workaround)
use strict;
use Tk;
my $mw = tkinit;
my @cb;
my $I = 0;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$cb[$I] = $mw->Checkbutton(-text => $I++)->pack;
$mw->Button(-text => 'Print Values', -command => sub{
for ($I = 0; $I < @cb; $I++) {
print $I, ': ', $cb[$I]->{'Value'}, "\n";
}
}
)->pack;
MainLoop;
Show quoted text
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu