On 03/19/2012 05:40 PM, John Fabiani wrote:
> OpenSuse 12.1, python 2.7,  wxpython 2.8.11, latest Dabo.
>
> I get an traceback when I enter a number in the control.  I'm trying to use
> the dNumeric to enter in integers using the below code.
>
> gs.append(dabo.ui.dNumericBox(self, RegID = 'outQtyID',AutoWidth = True,
> DecimalWidth = 0, Alignment = 'left'))
>
> I think I needed the Alignment because the control was being cut off on the
> screen!
>
> Traceback (most recent call last):
>    File "/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-
> unicode/wx/lib/masked/maskededit.py", line 3118, in _OnChar
>      newfield = self._FindField(newpos)
>    File "/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-
> unicode/wx/lib/masked/maskededit.py", line 3202, in _FindField
>      raise IndexError('position %s out of range of control' % str(pos))
> IndexError: position 15 out of range of control

I have narrowed this down to the following test case:

Integer field, DecimalWidth=0
Use Backspace key to remove digits
This resets value to 0
Type in new integer and you get Traceback above

Selecting any other way does not cause this problem i.e hold down Shift 
key and use arrow key to select.
I tried  working with NumericBlankToZero, but that does not seem to do 
anything.
Any suggestions on where I could look deeper in the code would be 
appreciated.

>
> Johnf

Thanks,
-- 
Adrian Klaver
[email protected]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to