Pmw Counter bug?

Martin Franklin martin.franklin at bedford.waii.com
Mon Nov 13 10:35:02 EST 2000


I think there was a posting about a bug in Pmw.Counter widget
under python 2.0 Tcl/Tk8.3.2 when you press the up and down 
buttons all you got was a beep!

I just discovered I also have this bug and I have a fix.....

#### old code....


def _changeNumber(text, factor, increment):
  value = long(text)
  if factor > 0:
    value = (value / increment) * increment + increment
  else:
    value = ((value - 1) / increment) * increment
  
  return str(value)[:-1]



##### new code.....

def _changeNumber(text, factor, increment):
  value = long(text)
  if factor > 0:
    value = (value / increment) * increment + increment
  else:
    value = ((value - 1) / increment) * increment
  
  return str(value)




More information about the Python-list mailing list