Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Tk GUI Building with Loops

by Chmrr (Vicar)
on Nov 26, 2002 at 14:48 UTC ( #215836=note: print w/replies, xml ) Need Help??

in reply to Tk GUI Building with Loops

The only problem that I see is that it should be -textvariable, not -textVariable (case matters..). In fact, you should be getting a big fat error with the code as it currently is, complaining about "bad option '-textVariable'".

Given that change, the following simulation of your code works for me:

#!/usr/bin/perl -w use Tk; use Tk::LabEntry; $a{bar} = "foo"; $mw = MainWindow->new(); for (1..3) { $mw->LabEntry(-label => "Component:", -width => 5, -labelPack => [ qw/-side left/ ], -textvariable => \$a{bar})->pack; } $mw->after(1000,sub{$a{bar} = "Moose!"}); MainLoop;

Tangential update: A quarter of a thousand writeups, and counting. I think I need to start attending my local PM-ers anonymous support group.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://215836]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2021-04-12 18:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found