Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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]
[jedikaiti]: Good $localtime, Monks
[jedikaiti]: Pretty!
[karlgoethebier]: jedikaiti: i just wanted to ask ;-)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2017-07-20 15:52 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (305 votes). Check out past polls.