[wxPython] A Possible wxPython Bug

PythonWin 2.0b1 (#5, Sep 20 2000, 12:29:43) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2000 Mark Hammond (MarkH@ActiveState.com) - see
'Help/About PythonWin' for further copyright information.

from wxPython.wx import *
p= wxPoint(20, 30)
s= wxSize(100, 300)
r= wxRect(p, s)

Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "G:\Python20\wxPython\misc.py", line 317, in __init__
    self.this = apply(miscc.new_wxRect,_args,_kwargs)
  File "G:\Python20\wxPython\misc.py", line 157, in __getattr__
    raise AttributeError,name
AttributeError: __int__

# If we specify the rectangular corners instead, we get a similar result:

p1= wxPoint(100, 300)
r= wxRect(p, p1)

Exception exceptions.AttributeError: <exceptions.AttributeError instance at
021FFDBC> in <method wxRectPtr.__del__ of wxRect instance at 021F2ECC> ignored
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "G:\Python20\wxPython\misc.py", line 317, in __init__
    self.this = apply(miscc.new_wxRect,_args,_kwargs)
  File "G:\Python20\wxPython\misc.py", line 157, in __getattr__
    raise AttributeError,name
AttributeError: __int__

Colin W.

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

PythonWin 2.0b1 (#5, Sep 20 2000, 12:29:43) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2000 Mark Hammond (MarkH@ActiveState.com) - see
'Help/About PythonWin' for further copyright information.
>>> from wxPython.wx import *
>>> p= wxPoint(20, 30)
>>> s= wxSize(100, 300)
>>> r= wxRect(p, s)
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "G:\Python20\wxPython\misc.py", line 317, in __init__
    self.this = apply(miscc.new_wxRect,_args,_kwargs)
  File "G:\Python20\wxPython\misc.py", line 157, in __getattr__
    raise AttributeError,name
AttributeError: __int__

Use r=wxRect(p.x, p.y, s.width, s.height)

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users