Feedback on relm4 widget macro design #4
Replies: 2 comments 6 replies
-
i honestly prefer to do my widgets setup manually because while it might be a little more glue, it's also completely readable. when i first found this project a few days ago i was mildly confused by the macro because i wasn't sure where the this would be a huge improvement towards making things easier and more obvious. tho i'll still probably do everything manually. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/orgs/Relm4/discussions/679#discussioncomment-11585685
|
Beta Was this translation helpful? Give feedback.
-
Relm4 is continuing to improve and I think it's time to think about macros (earlier discussion can be found here: antoyo/relm#289). Since the ContainerExt trait does not exist anymore in gtk4-rs the macros from relm can't be simply ported over to relm4.
Also the new concepts of relm4 like trackers and generators should be integrated into the macros. And since the update function doesn't have access to the widgets anymore, the macros only need to generate code for the widgets but don't have to care about the model.
The following code shows an example of how the new macro for generating widgets could look like:
Please let me know what you think :)
Beta Was this translation helpful? Give feedback.
All reactions