D-Man writes: I think the registering of a callback is a nicer way of achieving the results, but that is just my preference. -D <jim response> Mine too. I use JPython/Jython extensively with Swing. Normally I would have to use the Java mechanism of creating a class for each handler and then pass a single instance of the class in as the argument to a handler registration method. And since Python does not support unnamed/"in place" classes this would be a pain since I would have to create "dummy named" event handler classes all over the place (each with one instance). However, the JPython/Jython implementation has a wonderful feature whereby you can assign a Python object to any Swing "property". In particular, you can designate a Swing event handler to be a Python callback method (just like in your example). This very nice feature is much loved and extensivley used by our programming team here at work. (It makes it all worthwhile!) </jim response>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4