Here is the OK button from the popup window.
my $ok_but = $bf->Button(
-text => 'Continue',
-width => 10,
-command => sub {
($idx) = $list_box->curselection();
if ( defined $idx ){
$job = $jobs[$idx];
$mw->destroy();
} else {
$mw->destroy();
}
)->pack(-side => 'bottom',
-padx => 10,
-pady => 5);
.
.
.
at the end of the subroutine i have
$top->Mainloop();
return $job if defined $job;
return 0;
I must be missing something very obvious or I've been looking at the code too long to see my mistake. Because it always returns 0 before I even click 'Continue'.
Thanks for the help.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.