Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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]
[erix]: (NSFC - Not Safe For Church)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2017-09-24 20:36 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (274 votes). Check out past polls.