Tk Library Source Code

View Ticket
Login
Ticket UUID: 900165
Title: BWidget progressbar problem
Type: Bug Version: None
Submitter: decosterjos Created on: 2004-02-19 10:50:10
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-02-11 06:07:11
Resolution: None Closed By: dev_null42a
    Closed on: 2006-02-10 23:07:11
Description:
Hi, 
 
The BWidget progressbar fails when using large values. This is 
the code in version 1.7.0: 
 
$path.bar coords rect -1 0 [expr {$val*$w/$max}] $h 
 
Large integer values used for val and max will cause wrapping 
problems for 32 bit integers. Making the new calculation using 
doubles will fix the problem: 
 
$path.bar coords rect -1 0 [expr {double($val)*$w/$max}] $h 
 
 
Kind regards, 
 
Jos.
User Comments: dev_null42a added on 2006-02-11 06:07:11:
Logged In: YES 
user_id=1381097

double() implemented to allow very large maxima.