sub updChatterbox {
my ($mytopchar, $myposition) = $Chatfield->yview(); # retreive scroll pos
&Status('Checking for new chat messages...');
foreach (&getFromServer('chat')) { &printChat("$_"); }
&Status($status_idle);
if ($myposition == 1) {
$Chatfield->yview(moveto=>$myposition);
}
else {
$Chatfield->yview(moveto=>$mytopchar); # restore scroll pos
}
}
####
$Chatfield->see('end');
####
if ($myposition == 1) {
$Chatfield->yview(moveto=>$myposition);
}
else {
$Chatfield->yview(moveto=>$mytopchar); # restore scroll pos
}