Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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 Tk module.

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

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-05-24 11:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found