Re: pTk Scrolled Text problem
Slaven Rezic <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
"Konovalov, Vadim" <[email protected]> writes: > > Here is a script that will show the problem... When it starts up it > > will consume 100% cpu due to the scrollbar attempting to redraw... > > Watch the thumb bounce up and down in the scroll region. > > this problem is in perl/Tk and does not appear to be in Tcl/Tk. > Because if I replace many "use Tk; use Tk::something" with single > > use Tcl::Tk qw(:perlTk); > > , the problem does not appear. > > As a side note, following lines in that script are inessential but > incorrect: > > # subroutine declarations, needed by strict setting > use subs qw( CreateMainUI ); > > removing those do not influence breakage > Sorry, same problem with Tcl::Tk 0.88 + Tcl 0.88 on a FreeBSD/XFre86 system. I think that the length of the inserted text is crucial for the problem to appear. So if your're on a Windows system, you have to insert different text to make the problem occur. Interestingly, after a few iterations the Tcl interpreter dies: too many nested evaluations (infinite loop?) while executing "place .sc02._grid.vscroll -relwidth 1.0 -relheight 1.0 -in .sc02._grid.vframe - x 1 -y 0 -width -1" ("eval" body line 1) invoked from within "eval place $sb $args" (procedure "ScrolledWindow::_setSBSize" line 3) invoked from within "ScrolledWindow::_setSBSize .sc02._grid.vscroll 13 -relwidth 1.0 -relheight 1.0 -in .sc02._grid.vframe -x 1 -y 0 -width -1" (command bound to event) too many nested evaluations (infinite loop?) while executing "ScrolledWindow::_setSBSize .sc02._grid.vscroll 13 -relwidth 1.0 -relheight 1.0 -in .sc02._grid.vframe -x 1 -y 0 -width -1" (command bound to event) too many nested evaluations (infinite loop?) while executing "ScrolledWindow::_set_vscroll .sc02 0 0.454545" (vertical scrolling command executed by text) too many nested evaluations (infinite loop?) while executing "ScrolledWindow::_set_hscroll .sc02 0 1" (horizontal scrolling command executed by text) I usually avoid using two optional scrollbars because of this problem. Best is to make one of the two fixed, or to set word/character wrapping to on, so there's no need for a horizontal scrollbar. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tksm - Perl/Tk program for searching and replacing in multiple files http://ptktools.sourceforge.net/#tksm -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]