[wxPython-users] file with all events from a widget
Paul Sijben
sijben at eemvalley.com
Fri Jun 8 08:54:09 PDT 2007
Paul,
thanks for the input! Unfortunately I needed it ordered by launching class.
Spent the (too hot) Friday afternoon making a script (attached) that =
tries to get the events from the source tree. It does its job quite =
bluntly but it seems to yield the desired result.
When running it as python getWxEvents.py =
/home/sijben/Desktop/wxPython-src-2.8.4.0/wxPython/src I got the second =
attached file. I hope it is to some use for somebody.
I noticed it it not completely correct (e.g. the events for a slider =
are wrong). But it will suffice for now for me.
Paul
Robin Dunn wrote:
> Paul Perez wrote:
>> On 6/4/07, *Paul Sijben* <sijben at eemvalley.com =
>> <mailto:sijben at eemvalley.com>> wrote:
>>
>> OK thanks for the info. So I can generate a first stab from the =
>> docs and
>> then be more complete after the SoC, that is fine. This is one of =
>> those
>> projects that I can not afford to spend time on and at the same =
>> time can
>> not afford to let lie....
>>
>> =
>> =
>> Here is a bit of help to get you started...
>>
>> import wx, wx.wizard, wx.calendar
>>
>> def reverse(dic):
>> result =3D {}
>> for key,val in dic.items():
>> if val in result:
>> raise Warning, "Duplicated (%s/%s/%s) found in reverse =
>> dictionary." % (val,key,result[val])
>> result[val] =3D key
>> return result
>>
>> EventMapX =3D {
>> 'EVT_ACTIVATE' : wx.wxEVT_ACTIVATE,
>
> BTW, starting in 2.8 you can use the binder object's typeId property =
> to get the value of the corresponding wxEventType. For example:
>
> >>>
> >>> import wx
> >>> wx.EVT_ACTIVATE.typeId
> 10158
> >>> wx.wxEVT_ACTIVATE
> 10158
> >>>
>
>
-- =
Paul Sijben tel: +31334566488
Eemvalley Technology fax: +31334557523
the Netherlands http://eemvalley.com =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getWxEvents.py
Type: text/x-python
Size: 2199 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070=
608/b7efa710/getWxEvents.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wxEventsByObjectType.py
Type: text/x-python
Size: 9474 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070=
608/b7efa710/wxEventsByObjectType.py
More information about the wxpython-users
mailing list