in reply to Perl/Tk processing entered text with button

Hi!

To get the text from an Entry, use get(). So this should work:

... sub {collect($ipadde->get()); ...

Regards, mawe

Replies are listed 'Best First'.
Re^2: Perl/Tk processing entered text with button
by strat (Canon) on Feb 24, 2005 at 07:45 UTC
    as an alternative, you can bind a variable to the entry widget, e.g.
    use vars qw($IpAddress); my $entry = $parent->Entry(-textvariable => \$IpAddress) ->pack(-side => 'left'); $parent->Button(-text => 'Go', -command => \&DoIt) ->pack(-side => 'left'); sub DoIt { print "Entry contains: $IpAddress\n"; } # DoIt

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Re^2: Perl/Tk processing entered text with button
by Anonymous Monk on Feb 23, 2005 at 15:44 UTC
    Thats wicked mate, cheers!