Hi great Monks,
This is my first program in PERL/TK.
I want user to select some text files from a list of text files in a folder.
I created that number of check buttons inorder to be selected by the user.
Pushing the checked contents into an array.
where the MainLoop must be placed. (i.e) where to use the array @a, whether before mainloop or after it.
My part of code is here:
my @a=(); @dir=qw(a.txt b.txt c.txt);## LIst of the text files in a directory. my $mw=new MainWindow; for my $i (0..$#dir) { $mw->Checkbutton(-text => $dir[$i], -command=>sub {push @a, $dir[$i]}) +->pack; } $mw->Button(-text=>"ok",-command=>sub {exit})->pack; MainLoop; print @a;
here in the above code @a prints none.
For the above mentioned problem can i use Win32::GUI's BrowseForFolder function.
Im struck with this one.
Please give your valuable suggestions.
Sorry for my English.
--Murugesan--
In reply to Tk and MainLoop by murugu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |