Ticket UUID: | 849829 | |||
Title: | AutoScroll not set in TK 8.5a0 | |||
Type: | Bug | Version: | None | |
Submitter: | dgp | Created on: | 2003-11-26 19:48:52 | |
Subsystem: | tclapps :: tkchat | Assigned To: | hartweg | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2004-04-30 20:32:03 | |
Resolution: | Fixed | Closed By: | patthoyts | |
Closed on: | 2004-04-30 13:32:03 | |||
Description: |
When Tk 8.5a0 is used to run tkChat 1.128, the chat area does not scroll to make new messages visible. Further examination shows that $Options(AutoScroll) is false, so apparently [tkchat::scroll_set] is failing to enable it. This probably traces back to a flaw in Tk 8.5a0, but the tkchat maintainer is probably best to continue the analysis. | |||
User Comments: |
patthoyts added on 2004-04-30 20:32:03:
Logged In: YES user_id=202636 Fixed some time ago. patthoyts added on 2003-12-04 05:27:22: Logged In: YES user_id=202636 A little checking shows that when all the text is visible, we do indeed get 0.0 and 1.0 for f1 and f2 so the first part is fine. When lots of text is present, then the following seems fine -- we can always adjust the tolerance if needed, but I have yet to force it beyond 1e-4. set Options(AutoScroll) [expr {(1.0 - $f2) < 1.0e-6 }] dgp added on 2003-12-03 23:22:01: Logged In: YES user_id=80530 while the patch is an improvement, it doesn't fully solve the problem. the scrolling commands from 8.5's [text] have much more precision in their arguments, so we run into the "real problem" of needing to detect when the second argument is "near" 1 rather than when it equals 1, because scrolling as far down as possible can leave the second argument short of 1 with a value more like 0.999506793914. This might also be viewed as an incompatibility in [text]. dgp added on 2003-12-03 05:46:07: File Added - 69354: 849829.patch Logged In: YES user_id=80530 Here's a patch that corrects the problem. String comparisons of numbers wasn't a good idea. Please review and apply if acceptable. |
Attachments:
- 849829.patch [download] added by dgp on 2003-12-03 05:46:07. [details]