just found a bug in $Subject.
A listctrl event has no "GetPosition", instead it's GetPoint.
Linux Py 2.2 wxPy 2.4.12
Error is:
Traceback (most recent call last):
File "PolicyDetail.py", line 105, in _adminmenu
selectBeforePopup(event)
File "/usr/lib/python2.2/site-packages/wxPython/lib/mixins/listctrl.py",
line 249, in selectBeforePopup
n, flags = ctrl.HitTest(event.GetPosition())
File "/usr/lib/python2.2/site-packages/wxPython/controls2.py", line 424, in
__getattr__
raise AttributeError,name
AttributeError: GetPosition
UC
- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
just found a bug in $Subject.
A listctrl event has no "GetPosition", instead it's GetPoint.
Linux Py 2.2 wxPy 2.4.12
Error is:
Traceback (most recent call last):
File "PolicyDetail.py", line 105, in _adminmenu
selectBeforePopup(event)
File "/usr/lib/python2.2/site-packages/wxPython/lib/mixins/listctrl.py", line 249, in selectBeforePopup
n, flags = ctrl.HitTest(event.GetPosition())
File "/usr/lib/python2.2/site-packages/wxPython/controls2.py", line 424, in __getattr__
raise AttributeError,name
AttributeError: GetPosition
Are you calling selectBeforePopup yourself? What kind of event are you passing to it?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I'm passing a listctrl item right click and yes, I'm calling it myself since
it's a nice and convenient method.
UC
- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
···
On Monday 27 October 2003 04:34 pm, Robin Dunn wrote:
Uwe C. Schroeder wrote:
> just found a bug in $Subject.
> A listctrl event has no "GetPosition", instead it's GetPoint.
>
> Linux Py 2.2 wxPy 2.4.12
>
> Error is:
> Traceback (most recent call last):
> File "PolicyDetail.py", line 105, in _adminmenu
> selectBeforePopup(event)
> File
> "/usr/lib/python2.2/site-packages/wxPython/lib/mixins/listctrl.py", line
> 249, in selectBeforePopup
> n, flags = ctrl.HitTest(event.GetPosition())
> File "/usr/lib/python2.2/site-packages/wxPython/controls2.py", line
> 424, in __getattr__
> raise AttributeError,name
> AttributeError: GetPosition
Are you calling selectBeforePopup yourself? What kind of event are you
passing to it?
just found a bug in $Subject.
A listctrl event has no "GetPosition", instead it's GetPoint.
Linux Py 2.2 wxPy 2.4.12
Error is:
Traceback (most recent call last):
File "PolicyDetail.py", line 105, in _adminmenu
selectBeforePopup(event)
File
"/usr/lib/python2.2/site-packages/wxPython/lib/mixins/listctrl.py", line
249, in selectBeforePopup
n, flags = ctrl.HitTest(event.GetPosition())
File "/usr/lib/python2.2/site-packages/wxPython/controls2.py", line
424, in __getattr__
raise AttributeError,name
AttributeError: GetPosition
Are you calling selectBeforePopup yourself? What kind of event are you
passing to it?
I'm passing a listctrl item right click and yes, I'm calling it myself since it's a nice and convenient method.
Looks like it is expecting a wxMouseEvent so that explains it. You can make an alias in wxListEvent if you want, just add "GetPosition = GetPoint" to the class definition. Or put your listevent in a custom class that forwards a call to GetPosition to the real GetPoint:
Hey, why do it simple if there's a complicated way
Actually I just copied the function into my code and replaced GetPosition with
GetPoint => works.
Thanks for the suggestion anyways.
UC
- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417
···
On Tuesday 28 October 2003 11:04 am, Robin Dunn wrote:
Uwe C. Schroeder wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 27 October 2003 04:34 pm, Robin Dunn wrote:
>>Uwe C. Schroeder wrote:
>>>just found a bug in $Subject.
>>>A listctrl event has no "GetPosition", instead it's GetPoint.
>>>
>>>Linux Py 2.2 wxPy 2.4.12
>>>
>>>Error is:
>>>Traceback (most recent call last):
>>> File "PolicyDetail.py", line 105, in _adminmenu
>>> selectBeforePopup(event)
>>> File
>>>"/usr/lib/python2.2/site-packages/wxPython/lib/mixins/listctrl.py", line
>>>249, in selectBeforePopup
>>> n, flags = ctrl.HitTest(event.GetPosition())
>>> File "/usr/lib/python2.2/site-packages/wxPython/controls2.py", line
>>>424, in __getattr__
>>> raise AttributeError,name
>>>AttributeError: GetPosition
>>
>>Are you calling selectBeforePopup yourself? What kind of event are you
>>passing to it?
>
> I'm passing a listctrl item right click and yes, I'm calling it myself
> since it's a nice and convenient method.
Looks like it is expecting a wxMouseEvent so that explains it. You can
make an alias in wxListEvent if you want, just add "GetPosition =
GetPoint" to the class definition. Or put your listevent in a custom
class that forwards a call to GetPosition to the real GetPoint: