Re: Hlist

Marc Dashevsky <[email protected]> Sat, 15 Apr 2006 22:16:21 -0400
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
At 08:39 PM 4/15/2006, Johan Meskens CS3 jmcs3 wrote:
>i am experiencing some trouble using the tk::hlist in an application
>i thought i was doing something wrong but using someone else's example
>script i experience the same problem namely, the browsecommand and command options don't deliver anything to the shift in the subroutine

You don't pass any arguments to browse().  Try the following edits:

>my $hlist;
>$hlist = $mw->Scrolled('HList',
>                -itemtype   => 'text',
>                -separator  => '/',
>                -selectmode => 'single',
>                -browsecmd  => sub{ browse($hlist) },
>                -command    => sub{ browse($hlist) }
>);
.
.
.
>sub browse {
>    my $choice = shift->selectionGet->[0];
>    $message = "You chose '$choice'";
>}

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]