Skip to content

Commit d17b1a4

Browse files
committed
-
1 parent 164f237 commit d17b1a4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

python_toolbox/wx_tools/widgets/cute_window/bind_savvy_evt_handler/bind_savvy_evt_handler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class BindSavvyEvtHandler(wx.EvtHandler):
3434
n_preceding_underscores_possibilities=(1,)
3535
)
3636
'''
37-
The name parser used by this event handler class for parsing event handlers.
37+
Name parser used by this event handler class for parsing event handlers.
3838
3939
Override this with a different instance of `NameParser` in order to use a
4040
different naming convention for event handlers.
@@ -52,8 +52,8 @@ def bind_event_handlers(self, cls):
5252
`bind_event_handlers` function is being called.
5353
'''
5454
if not isinstance(self, cls):
55-
raise TypeError('`cls` must be a class that the event handler is an '
56-
'instance of; you gave a `cls` of `%s`, which '
55+
raise TypeError('`cls` must be a class that the event handler is '
56+
'an instance of; you gave a `cls` of `%s`, which '
5757
'`%s` is not an instance of.' % (cls, self))
5858
event_handler_grokkers = \
5959
cls._BindSavvyEvtHandlerType__event_handler_grokkers

python_toolbox/wx_tools/widgets/cute_window/bind_savvy_evt_handler/event_codes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def monkeypatch_wx():
2323
(wx.EVT_BUTTON, wx.EVT_MENU)
2424

2525
wx.Menu._EventHandlerGrokker__event_code = wx.EVT_MENU
26+
wx.MenuItem._EventHandlerGrokker__event_code = wx.EVT_MENU
2627

2728
wx.Timer._EventHandlerGrokker__event_code = wx.EVT_TIMER
2829

@@ -42,9 +43,9 @@ def get_event_code_from_name(name, evt_handler_type):
4243
For example, given a `name` of `left_down` this function will return the
4344
event code `wx.EVT_LEFT_DOWN`.
4445
45-
If `evt_handler_type` has an `.event_modules` attribute, these modules will be
46-
searched for event codes in precedence to `wx` and the event handler type's own
47-
module.
46+
If `evt_handler_type` has an `.event_modules` attribute, these modules will
47+
be searched for event codes in precedence to `wx` and the event handler
48+
type's own module.
4849
'''
4950
processed_name = 'EVT_%s' % string_tools.conversions.\
5051
camelcase_to_underscore(name).upper()

0 commit comments

Comments
 (0)