Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Tk GUI Building with Loops

by Chmrr (Vicar)
on Nov 26, 2002 at 14:48 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-04-23 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found