lapce / floem

A native Rust UI library with fine-grained reactivity
https://lap.dev/floem/
MIT License
3.05k stars 133 forks source link

missing actions - open_file, save_as #612

Closed JimitSoni18 closed 1 month ago

JimitSoni18 commented 1 month ago

I tried the files example from the examples directory after adding floem dependency from the git repository, as i was getting #574 error with cargo add, and the code did not compile. it gave me this errors:

   Compiling rxp v0.1.0 (/.../rxp)
error[E0432]: unresolved imports `floem::action::open_file`, `floem::action::save_as`
 --> src/main.rs:2:14
  |
2 |     action::{open_file, save_as},
  |              ^^^^^^^^^  ^^^^^^^ no `save_as` in `action`
  |              |
  |              no `open_file` in `action`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rxp` (bin "rxp") due to 1 previous error
jrmoulton commented 1 month ago

Are you sure you are using the latest main? I've just checked out latest main and don't have those issues.

JimitSoni18 commented 1 month ago

@jrmoulton yes, here is the dependencies section of my cargo.toml:

[dependencies]
floem = { git = "https://github.com/lapce/floem", branch = "main" }

should I add anything else other than branch?

Also, looking at the code in the main branch, I don't find the functions open_file and save_file in the module actions src/actions.rs

JimitSoni18 commented 1 month ago

sorry, i forgot to add features, closing the issue