-
Notifications
You must be signed in to change notification settings - Fork 23
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
Not enough info in set_on_submit #23
Comments
Hi, I would appreciate if somebody would either tell me that this functionality is not supported/missing/or I'm doing something wrong(most likely). Seriously... For somebody (like author of the crate who know the code and workings of it) to be able to help this shouldn't be that difficult. Leaving/Ignoring questions is rather... well let's be honest disappointing and irritating. |
Note that fn Enter_Fn(app: &mut cursive::Cursive, row: usize, index: usize, table_id: usize) { }
for i in 0..10 {
//create panels
let mut panel_left = create_table();//see decl below, it is the same as in examples from the repo
panel_left.set_on_submit(|s, r, index| Enter_Fn(s,r,index, i)); //register callback. Note that here we include the `i` parameter.
// here I have some code that defines layout etc, so the last line is "pseudo code"
siv.add_layout(panel_left);
} |
Hi everyone, I'm using cursive crate along with cursive_table_view crate.
I'm registering callback to each created table and yes, this callback is being triggered, but I believe that there is not enough info in that callback.
How to know in the Enter_Fn function which table was active when the enter was pressed, that is, we are inside of the Enter_Fn callback but all we have is app, row and index but not the view which triggered that callback.
Thanks for any help
The text was updated successfully, but these errors were encountered: