for ($x = 0; $x <= $file_counter-1; $x++) { $win_ckbox_array[$x] = $right2->Checkbutton(-background=>'blue',-variable=>\$ckbox_stat[\$x])->pack (pady=>2); }
## you got backslash happy I think shouldn't it be: $right2->Checkbutton(-background=>'blue',-variable=>\$ckbox_stat[$x])->pack( pady=>2); ## -variable wants the reference to the var only -----Original Message----- From: Kurt Werth [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: perl/tk: checkbutton value in array? I've gotta be missing something simple here. How is it possible to store the values of multiple checkbuttons in an array? The code below acts like I've created a single checkbutton: for example, selecting one of ten selects all ten. for ($x = 0; $x <= $file_counter-1; $x++) { $win_ckbox_array[$x] = $right2->Checkbutton(-background=>'blue',-variable=>\$ckbox_stat[\$x])->pack (pady=>2); } Not storing the checkbutton variable in an array works fine. That's great for one or two checkbuttons, but that won't work in this instance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]