Oliver Schaedlich wrote: > Greetings, > > 15.12.2003, zentara wrote: > > > $main ->> Button > > ( -text => 'Add', > > -command => sub{\&add_item($var1,$var2)} > > ) -> pack; > [...] > > sub add_item { > [...] > > my $entry1 = $_[0]->get(); > > my $entry2 = $_[1]->get(); > [...] > > } > > thanks for your reply. I tried this out and it works, though I have no > idea what it actually does and why I have to alter/decode/whatever the > fetched data in the first place. I guess I have to read into "get()" > a bit. > > Thanks a bunch, same goes to Laurent. > > Best regards, > oliver.
There is no decoding happening. Entry is a Tk widget. It is not a string. The string contents are a property held in the widget's hash. The get method is an accessor function that returns this value. AFAIK, Tk does not use the sort of default properties that you might find in VB, where you can assign a Text widget to a string, and the string gets the value of that widgets text. Since Perl stores its references at least partly as strings, you get the reference string when you assign or use a widget referencxe in string context. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>