Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I have struggled for close to three hours but I am afraid I am not making any progress. I have a key/value table populated by a configuration file. I would like to have the capability to edit the values if possible and manipulate them later in a my data structure. Here's part of the code I am using:
$data{$fields[$tag][0]}{'entry'}= $data{$fields[$tag][0]}{'frame'}->En +try(-takefocus => 1,-width => 60, -textvariable=>\$data{$fields[$tag] +[1]}{'value'}) ->pack(-side => 'left', -fill => 'y'); my $input = $data{$fields[$tag][0]}{'entry'}->get($f{$fields[$tag][1]} +{'value'}); print $input;
I am getting this error: wrong # args: should be ".frame.pane.frame.frame.entry get" at c:/Perl/site/lib/Tk.pm line 250, <DATA> line 35. How can I update my data structure with new entry information? Are there other alternatives to get? Thanks a million.

Replies are listed 'Best First'.
Re: refreshing data structure using Get Method in PTk
by shmem (Chancellor) on Apr 15, 2007 at 08:26 UTC
    To retrieve the value of an Entry just look into the textvariable reference you passed into the constructor:
    my $input = ${$data{$fields[$tag][1]}{'value'}}; print $input;

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}