Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Perl tk gui hangs when large data thrown to it

by ghosh123 (Monk)
on Oct 15, 2013 at 11:41 UTC ( [id://1058289]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl tk gui hangs when large data thrown to it
in thread Perl tk gui hangs when large data thrown to it

Well, even the simplified version will be quite long. I have described the entire thing here, but may be it is not sufficient for you to guess.
FYI, I am giving the update gui routine here, which is getting called from the server function as and when it has read some data from the socket.

sub updateGui { my $self = shift; my $data = shift; my $hlist = $self->{jobTree}; my @cellInfo = split( /\s/, $data ); my $font = "{helvetica} -12 bold"; my $style1 = $self->{displaybaseObj}->getItemStyle( $hlist, 'text', -foreground => 'black', -anchor => 'nw', -background => "$cellInfo[2]", -font => $font ); my $num1 = int( rand(2) ) + 1; my $num2 = int( rand(2) ) + 0; my $subnode1 = $cellInfo[0] . "." . $num1; my $subnode2 = $cellInfo[0] . "." . $num1 . "." . "0" . "." . $num +2; $hlist->itemConfigure( $subnode1, 2, -text => "$cellInfo[1]", -style => $style1 ); $hlist->itemConfigure( $subnode2, 2, -text => "$cellInfo[1]", -style => $style1 ); }

The $data to this routine is like "500 running green" i.e a gui row , some status of that and a colour separated by single space. $hlist is the Tree widget which just a bit extension of the built in HList.pm Tk module.

Let me see , if I can post a very simplified version of it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found