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
RFC/Announcement: cursive_hexview #175
Comments
Those methods are part of extension traits implemented for all Views: you just need to |
Hm, it does not work :(
also
|
So the error messages is unfortunately using the wrong (private) path, but the trait itself is present in the link I posted: |
I included the use directive but still the error. Is it possible, that it does not automatically implement it for external structs and I have to implement them "manually"? |
Here is the default example from hexview using extern crate cursive;
extern crate cursive_hexview;
use cursive_hexview::{DisplayState, HexView};
use cursive::Cursive;
use cursive::views::{Dialog, DummyView, LinearLayout, TextView};
use cursive::traits::{Boxable, Identifiable};
fn main() {
let mut cur = Cursive::new();
let explanation =
TextView::new("Use the keys + - ↑ ↓ ← → 0-9 a-f for the HexView.\nUse q to exit.");
let view = HexView::new().display_state(DisplayState::Editable);
cur.add_layer(
Dialog::around(
LinearLayout::vertical()
.child(explanation)
.child(DummyView)
.child(view.with_id("view").fixed_width(80)),
).title("HexView"),
);
cur.add_global_callback('q', |cur| cur.quit());
cur.add_global_callback('o', |cur| {
cur.call_on_id("view", |v: &mut HexView| ());
});
cur.run();
} I just |
I indeed can confirm that it works in the examples, strange though it does not work in my project :D I will investigate that. But thank you netherless |
Anyway - it looks really nice! Congratulations for the good work! :) |
Sure, I would be pleased :) |
You may want to add a screenshot on the Readme to impress visitors ;) |
It looks like the trait thing might be a regression to 0.7.5. I build my project with your git linked to this repository and then it tells me about all the strange things (to use the private trait and that is it not possible to use with_id). You may want to test that and verify it with my experience? Sure, I can include a picture of the default example :) |
The example I posted compiles fine with this in [dependencies]
cursive = { git = "https://github.com/gyscos/cursive", default-features = false } |
Maybe a |
You can try the example and see that it compiles fine after any combination of [[package]]
name = "cursive"
version = "0.7.6-alpha.0"
source = "git+https://github.com/gyscos/cursive#ba0bc6dc564f714ce234e64595e9db70c7dc126d" Maybe you're pulling two different versions of |
Yeah... that's the problem. One from the cursive_hexview itself (namely the stable version 0.7.5) and one from "my" cargo.toml namely the git version. Any method to get around this, e.g. just tell cursive_hexview to use the version the user wants? |
Not sure how to do that. I tried using the |
Hi everyone,
for my project in needed some kind of displaying hexdata so I created a hexview which is accessable via https://github.com/hellow554/cursive_hexview
Please, feel free to file any issues, pullrequests, doc changes, more cats pics, everything.
I would really like to get some feedback, because it's my first published rust project.
One particular thing I noticed is, that I can't use
with_id
or*_height/width
methods on the view. What is necessary to be able to use them @gyscos ?Anyhow, you are welcome to use is, commend it, fork it, change it with any ideas you might have.
The text was updated successfully, but these errors were encountered: