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

readme nightly example not working #55

Closed
jaroslaw-weber opened this issue Jul 28, 2017 · 6 comments
Closed

readme nightly example not working #55

jaroslaw-weber opened this issue Jul 28, 2017 · 6 comments

Comments

@jaroslaw-weber
Copy link

Tried to run example with #[widget]

error: cannot find macro `view!` in this scope
  --> src/main.rs:47:5
   |
47 |     view! {
   |  
error[E0412]: cannot find type `Window` in this scope
  --> src/main.rs:22:13
   |
22 |     window: Window,
   |             ^^^^^^ not found in this scope
   |
help: possible candidate is found in another module, you can import it into scope
   |
1  | use gtk::Window;
   |

also:

 --> src/main.rs:5:1
  |
5 | extern crate relm_derive;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

I used github repo just to be sure but not working

@antoyo
Copy link
Owner

antoyo commented Jul 28, 2017

I improved the README.
You'll probably have some other use statements to add, for gtk and your message type variants.

I know that relm requires more documentation, but since I'm still in the design phase (hopefully most is already done in branch feature/futures-glib), that will have to wait.

Currently, the best is to look at the examples, buttons-attribute being a good one to start with.

@jaroslaw-weber
Copy link
Author

thanks, buttons-attribute worked. maybe add "macro-example" to examples folder and link it to readme? :)

@antoyo
Copy link
Owner

antoyo commented Jul 31, 2017

What do you mean by "macro-example"?

@jaroslaw-weber
Copy link
Author

sorry for not being clear enough :). i mean add an example file with "macro" or "nighty" in name, so when someone looks for macro example, he/she can see it from the directory, doesnt need to open each example to find it. just an idea

@antoyo
Copy link
Owner

antoyo commented Jul 31, 2017

Oh, examples that ends with -attribute.rs use the #[widget] attribute, so they are nightly-only for now.
Is it enough?

@jaroslaw-weber
Copy link
Author

oh, i didnt get it. sorry, i think you can close the ticket now.

@antoyo antoyo closed this as completed Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants