in reply to data structure problem
There'll be more code than that, of course, but not a lot more. When you create the first_BrowseEntry widget, you'll include the "first_browse_callback" function as the "-browsecmd" option value.... # populate %hash as per the OP # create $first_BrowseEntry, then: $first_BrowseEntry->insert( "end", $_ ) for ( sort keys %hash ); ... sub first_browse_callback { $second_BrowseEntry->delete( 0, "end" ); my $chosen = $first_BrowseEntry->get; $second_BrowseEntry->insert( "end", $_ ) for ( sort @{$hash{$chose +n}} ); }
(updated to use consistent naming on the widget variable)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: data structure problem
by perltux (Monk) on Nov 08, 2012 at 04:52 UTC |