wxWidgets issue

Bernhard Reiter bernhard at intevation.de
Tue Jun 3 11:03:36 CEST 2008


On Tuesday 03 June 2008 05:28, Anthony Lenton wrote:
> line 412, in __init__
>     self.numGroupsCtrl.SetRange(1, sys.maxint)
>   File
> "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py",
> line 2265, in SetRange
>     return _controls_.SpinCtrl_SetRange(*args, **kwargs)
> OverflowError: in method 'SpinCtrl_SetRange', expected argument 3 of type
> 'int'
>
> I suspect this is because my python is aware of the 64-bit hardware
> it's running on, but wx has been compiled for 32 bits.  I don't know
> if there's a way to ask wx which is the maximum integer it'll accept
> as an argument, but this fixes it anyway:
>
> Index: Thuban/UI/classgen.py
> ===================================================================
> --- Thuban/UI/classgen.py       (revisión: 2842)
> +++ Thuban/UI/classgen.py       (copia de trabajo)
> @@ -409,7 +409,7 @@
>          self.numGroupsChanging = False
>          self.steppingChanging = False
>
> -        self.numGroupsCtrl.SetRange(1, sys.maxint)
> +        self.numGroupsCtrl.SetRange(1, 2**31-1)

Good to know!
Seeing this hardcoded is not a good solution for trunk I guess,
so we probably would need to make it a constant or find out how
wx can determine this.
I wonder if you could open an issue for it on wald.
Do you have an account there, btw?

Best,
Bernhard

-- 
Managing Director - Owner: www.intevation.net       (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20080603/dd93f320/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)