Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please, add widget-list example without attribute #140

Open
ivmazurenko opened this issue Oct 28, 2018 · 2 comments
Open

Please, add widget-list example without attribute #140

ivmazurenko opened this issue Oct 28, 2018 · 2 comments
Labels

Comments

@ivmazurenko
Copy link

let widget = self.hbox.add_widget::<Counter>(());

It is very hard to understand how examples work.
You use widget attribute in your examples, and it is very annoying. Need to understand all code generation. What is hbox in your example? How to see where it is created? What is Counter? What fields included in counter? And what type of these fields? What is this: #[name="remove_button"] ?

Boilerplate code is maybe not needed in real projects, but without it it is really hard to understand your code.

@ivmazurenko ivmazurenko changed the title Un-understandable examples Please, add widget-list example without attribute Oct 28, 2018
@antoyo
Copy link
Owner

antoyo commented Oct 28, 2018

Sure, I'll add it.

@antoyo antoyo added the easy label Nov 16, 2018
zzeroo added a commit to zzeroo/relm that referenced this issue Jan 24, 2019
I prefixed the example name with `-attributes`. This prefix is used in
other examples, too. The prefix showes the usage of `#[widget]` and macros
like `view!`.
I plan to create an example without the usage of attributes to solve
antoyo#140.
zzeroo added a commit to zzeroo/relm that referenced this issue Jan 24, 2019
widget-list example without the usage of relm attributes. This addresses
antoyo#140.

This example is not working!
@ronanM
Copy link

ronanM commented Apr 11, 2020

With https://github.com/dtolnay/cargo-expand (cargo install cargo-expand) and rustup toolchain install nightly.

I use cargo expand --example widget-list to try to understand the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants