Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

The example doesn't work with version 0.3.0 #66

Open
TheKnarf opened this issue Sep 28, 2022 · 3 comments
Open

The example doesn't work with version 0.3.0 #66

TheKnarf opened this issue Sep 28, 2022 · 3 comments

Comments

@TheKnarf
Copy link

The example doesn't work with version 0.3.0. Are you gonna release a new version? or maybe add some more documentation to make it easier to get started?

@setzer22
Copy link
Owner

setzer22 commented Sep 29, 2022

Hi! The main branch has diverged from 0.3.0. If you want the example that's compatible from the crates.io version, you can find it by browsing an older version of the repo: https://github.com/setzer22/egui_node_graph/tree/008aa9ad5b97c780216b89834a2d0913c922654a

On the other hand, you may be interested in using a git dependency so you can get all the new developments from the main branch. I am using the main branch of this library for several projects, so I always try to keep in in a working state (except for the occasional bug).

As for next release, I can't tell when that will happen. I should probably make a 0.4.0 soon with the current state of the repo, but first I need to do some thorough testing to ensure there are no bugs.

@lenoqt
Copy link

lenoqt commented Nov 1, 2022

This runs the desktop app just fine but the web version it doesn't work, or maybe I am doing things in the wrong order? I tried with

./setup_web.sh && ./build_web.sh

but this fails with:

   Compiling egui_node_graph_example v0.1.0 (/Users/gustavo.barrios/Documents/rust/egui_node_graph/egui_node_graph_example)
error[E0277]: expected a `FnOnce<(&CreationContext<'_>,)>` closure, found `NodeGraphExample`
  --> egui_node_graph_example/src/lib.rs:22:34
   |
22 |     eframe::start_web(canvas_id, Box::new(app))
   |                                  ^^^^^^^^^^^^^ expected an `FnOnce<(&CreationContext<'_>,)>` closure, found `NodeGraphExample`
   |
   = help: the trait `for<'r, 's> FnOnce<(&'r CreationContext<'s>,)>` is not implemented for `NodeGraphExample`
   = note: required for the cast from `NodeGraphExample` to the object type `dyn for<'r, 's> FnOnce(&'r CreationContext<'s>) -> Box<(dyn App + 'static)>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `egui_node_graph_example` due to previous error

@lenoqt
Copy link

lenoqt commented Nov 15, 2022

I fixed this by merging this example with the one in eframe (this uses trunk for building it instead of the shell scripts), I could submit a PR, are any consideration I would have to take before doing it?

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

No branches or pull requests

3 participants