Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: TK MListbox random issue

by thundergnat (Deacon)
on Feb 11, 2013 at 20:32 UTC ( #1018235=note: print w/ replies, xml ) Need Help??


in reply to Re^2: TK MListbox random issue
in thread TK MListbox random issue

I'm not sure how it would become empty randomly.

Yeah, me neither, but since you left out any inkling of where @dispRes and %hash come from, or how they are generated, or what might be in them, I am reduced to making wild guesses and suppositions. Having undefined column headings gives me an error similar to what you reported but I am running perl 5.16.1 so it may be different in newer Perls. Try running the following and see if your error is the same. If so, my previous comment stands, if not, well, sorry, my mind reading is not up to snuff.

use warnings; use strict; use Tk; my %w; $w{mw} = MainWindow->new; $w{lb} = $w{mw}->Scrolled( qw/MListbox -selectmode single -scrollbars oe -font small / )->pack(-expand => 1, -fill => 'both'); for my $x (qw//) { #for my $x (qw// || 'oops') { #for my $x (qw/a b c/) { $w{lb}->columnInsert('end', -text => $x ) ; } for (1 .. 10){ my @row = ($_, $_, $_,); $w{lb}->insert('end', \@row); $w{lb}->see('end'); $w{lb}->update; } MainLoop;


Comment on Re^3: TK MListbox random issue
Download Code
Re^4: TK MListbox random issue
by lightspd (Initiate) on Feb 11, 2013 at 20:43 UTC
    Different error. Can't call method "see" on undefined value. My bad on the code paste, I copied the wrong array in my post(will fix), the hash is returned by a xml parser. I do a dump of the data received to see what's coming in and the structure doesn't change.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-10-24 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls