in reply to Re: How to find the selected radio button in a Loft GUI
in thread How to find the selected radio button in a Loft GUI

Yes, I could supply code but what I'm after is a snippet of an idea to follow. I was wondering if there was a way in perl to do something like: for (7..14) { if ($win-> rb{$_}-> Checked()) { ... indicate found and exit loop ... } } New to perl so not sure what to put for the test condition for the for loop. rb{$_) is just something to indicate my thoughts on what I want. Does that make sense? Cheers
  • Comment on Re^2: How to find the selected radio button in a Loft GUI

Replies are listed 'Best First'.
Re^3: How to find the selected radio button in a Loft GUI
by GrandFather (Saint) on Jun 14, 2007 at 00:26 UTC

    I'd either put the radio button objects into and array or hash then loop using either:

    for (7..14) { if ($buttons[$_]->Checked ()) { ... indicate found and exit loop ... } }

    or

    for my $key (keys %buttons) { if ($buttons{$key}->Checked ()) { ... indicate found and exit loop ... } }

    depending on what you are trying to achieve.


    DWIM is Perl's answer to Gödel