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
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/1999285.NBmzfIalkE@linux-12
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
Seems related to the DecimalWidth = 0 setting. I put a DecimalWidth > 0
and the problem goes away. Looking at what happens when there is a
decimal separator and decimal places, the code puts the cursor just to
the right of integer value. In the all integer case it seems to throw
the error because it cannot insert to the right of the integer.
>
> Johnf
--
Adrian Klaver
adrian.klaver@gmail.com
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F67E777.7030905@gmail.com
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
adrian.klaver@gmail.com
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F6A317A.9050903@gmail.com
Użytkownik John Fabiani napisał:
> OpenSuse 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
Hi.
It's probably wxPython issue.
I don't have such problems on 2.8.12.1.
Can you upgrade to the newer version?
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F6ADAEE.3040102@rz.onet.pl
On 03/22/2012 12:55 AM, Jacek Kałucki wrote:
> Użytkownik John Fabiani napisał:
>> OpenSuse 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
>
> Hi.
>
> It's probably wxPython issue.
> I don't have such problems on 2.8.12.1.
> Can you upgrade to the newer version?
I have that version on a machine and I see the same problem. It only
happens with integer only fields and using backspace to replace a number.
--
Adrian Klaver
adrian.klaver@gmail.com
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F6B2724.6050105@gmail.com
On Thursday, March 22, 2012 08:55:26 AM Jacek Kałucki wrote:
> Użytkownik John Fabiani napisał:
> > OpenSuse 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
>
> Hi.
>
> It's probably wxPython issue.
> I don't have such problems on 2.8.12.1.
> Can you upgrade to the newer version?
I can't upgrade but I doubt that's the problem. Adrian is reporting that he
is having the same trouble with 2.8.12. This has something to do with the
insertion point and the fact I'm trying to use the class with a integer.
Works great with anything that has decimal but not with the decimal = zero.
At first I thought it had something to do with the Alignment setting but with
that removed I'm still getting the same traceback.
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/1884109.sxArj0S2ia@linux-12
On Thursday, March 22, 2012 08:55:26 AM Jacek Kałucki wrote:
> Użytkownik John Fabiani napisał:
> > OpenSuse 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
>
> Hi.
>
> It's probably wxPython issue.
> I don't have such problems on 2.8.12.1.
> Can you upgrade to the newer version?
One other thought - could it be something associated with the grid sizer?
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/1560543.Mqun9VDNYp@linux-12
Użytkownik John Fabiani napisał:
> On Thursday, March 22, 2012 08:55:26 AM Jacek Kałucki wrote:
>> Użytkownik John Fabiani napisał:
>>> OpenSuse 12.1, python 2.7, wxpython 2.8.11, latest Dabo.
>>
>> Hi.
>>
>> It's probably wxPython issue.
>> I don't have such problems on 2.8.12.1.
>> Can you upgrade to the newer version?
>
> I can't upgrade but I doubt that's the problem. Adrian is reporting that he
> is having the same trouble with 2.8.12. This has something to do with the
> insertion point and the fact I'm trying to use the class with a integer.
> Works great with anything that has decimal but not with the decimal = zero.
> At first I thought it had something to do with the Alignment setting but with
> that removed I'm still getting the same traceback.
Ok, I'll try to look deeper into this tonight.
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F6B4C8D.2060102@rz.onet.pl
On 3/22/12 9:00 AM, Jacek Kałucki wrote:
> Ok, I'll try to look deeper into this tonight.
I added a test for the case so you can run dNumericBox.py and reproduce it readily.
Perhaps we simply haven't told wxPython about the correct value when it resets to 0
or something.
In the meantime, dTextBox does a pretty good job with decimal values IMO, displaying
the appropriate number of decimal places depending on the DataStructure.
Paul
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4F6B5D19.7040301@ulmcnett.com
On Thursday, March 22, 2012 10:10:49 AM Paul McNett wrote:
> On 3/22/12 9:00 AM, Jacek Kałucki wrote:
> > Ok, I'll try to look deeper into this tonight.
>
> I added a test for the case so you can run dNumericBox.py and reproduce it
> readily. Perhaps we simply haven't told wxPython about the correct value
> when it resets to 0 or something.
>
> In the meantime, dTextBox does a pretty good job with decimal values IMO,
> displaying the appropriate number of decimal places depending on the
> DataStructure.
>
> Paul
Thanks Paul I did realize that I could replace the control. I wanted Jacek to
be aware of the issue. Also Adrian want to get involved.
Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/8598533.Dzj9DvfETQ@linux-12