Any change that this can make it into wxPython 2.8.9.2?
Having a problem when using numCtrl.ChangeValue(floatValue).
Problem can be demonstrated in the wxPython demo, change line 335, i.e.
From:
try:
self.target_ctl.SetValue(numvalue)
except:
type, value, tb = sys.exc_info()
To:
try:
self.target_ctl.ChangeValue(numvalue)
except:
type, value, tb = sys.exc_info()
I get a exception "TypeError: object of type 'float' has no len()" when
trying to use the combobox "Programmatically set the above value entry
ctrl" and having set the "Fraction width" to e.g. "2" and using one of
the float values.
Proposed correction is to add the following to wx.lib.masked.numctrl.py:
def ChangeValue(self, value):
"""
Sets the value of the control to the value specified.
The resulting actual value of the control may be altered to
conform with the bounds set on the control if limited,
or colored if not limited but the value is out-of-bounds.
A ValueError exception will be raised if an invalid value
is specified.
"""
## dbg('NumCtrl::ChangeValue(%s)' % value, indent=1)
BaseMaskedTextCtrl.ChangeValue( self, self._toGUI(value) )
## dbg(indent=0)
If above is o.k. could it be included with the next version? If yes,
should I submit a patch or is above fine?
Werner
···
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users