4 ms·
This looks really cool. Applying a thin layer over parts of the standard library is a very good idea IMO. Reduces the dependency tree but a lot. One question (
by kitd 4y ago
This looks really cool. Applying a thin layer over parts of the standard library is a very good idea IMO. Reduces the dependency tree but a lot.
One question (my Swing knowledge is at least 15 years old!): what's the simplest way to handle events using this? Eg taking the FormTest [1] example, how might one simply bind a model object to the UI elements?
[1] https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/src/main/java/org/httprpc/sierra/FormTest.java https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s...
- exabrial 4y agoI wish there was CDI integration with Swing or JavaFX and you can annotate handlers
- gk_brown 4y agoGreat question. You can do this with a cell consumer (i.e. the with() method). See OrientationTest for an example (e.g. leftToRightButton, rightToLeftButton): https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/src/main/java/org/httprpc/sierra/OrientationTest.java https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s... I should probably add a better example.
- gk_brown 4y agoAdded an example demonstrating how to add an action listener to a button: https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/src/main/java/org/httprpc/sierra/ActionTest.java https://github.com/HTTP-RPC/Sierra/blob/master/sierra-test/s... I'm not sure it's exactly what you were looking for, but hopefully it is similar enough.
- kitd 4y agoThat's great! As I say, my swing experience is very old and it's probably just a case of remembering the basic action framework more than anything else. But that fits in very nicely with how your library works using with().