2 ms·
My biggest problem with wxpython is that you apparently can't set closures as event handlers. Instead, you have to define a member function, and register it. T
by amelius 9y ago
My biggest problem with wxpython is that you apparently can't set closures as event handlers. Instead, you have to define a member function, and register it. This makes the process a bit tedious compared to JavaScript.
- ptx 9y agoThe documentation seems to claim[1] otherwise: It also allows the direct binding of events to: * A handler method in the same or another object. * An ordinary function like a static method or a global function. * An arbitrary callable object. If it works for arbitrary callable objects it should certainly work for closures. [1] https://docs.wxpython.org/events_overview.html https://docs.wxpython.org/events_overview.html