z3d has asked for the wisdom of the Perl Monks concerning the following question:
Right now, I have a code block like:
which works, albeit in an ugly fashion. Through newbie experimentation I see that it passes the $entryID to my sub, and I've cobbled together what I believe to be a bad hack that associates the $entryID to a key in a hash, from which I can pull the relevant pieces of data to determine which row was hit and move forward. But is there a better way? The ideal would be to double click a row and pass it a specific piece of data rather than relying on the $entryID pass - am I doing this wrong? For those that wonder, I've tried using $hlist->configure(-command => mysub($whatiwant)), but this resulted in the desired command being run immediately for every row returned (not desirable when the number of rows can be between 1 and a really really large number).my $hlist = $mw->Scrolled(qw/HList -columns 3 -width 70 -command main::launch_win/)->pack(qw/-expand yes -fill both/);
I confess that my thinking is a little too linear at times, so I don't immediately grok how to declare the command prior to having the (randomly) generated data available. Is there perhaps a better way to give the display I want with the functionality I need than by using Tk::HList?
Thank you all in advance for your time and thoughts.
z3d
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: TK::HList the best solution?
by eserte (Deacon) on May 11, 2004 at 10:15 UTC | |
by z3d (Scribe) on May 11, 2004 at 10:33 UTC | |
by eserte (Deacon) on May 11, 2004 at 10:43 UTC | |
|
Re: TK::HList the best solution?
by gri6507 (Deacon) on May 11, 2004 at 19:10 UTC | |
by z3d (Scribe) on May 12, 2004 at 08:39 UTC |