Skip to content

A beginner's doubts #3172

Answered by tronical
Vjze asked this question in Q&A
Jul 25, 2023 · 7 comments · 2 replies
Discussion options

You must be logged in to vote

Thanks for updating the source code - I can see it now. I can't run it (because it requires access to the database), but from a glance at the code I think I can see what the issue might be.

In the callback that's invoked when pressing the button (after selecting for example "Carton"), this function is called:

fn get_carton_result(text: String,app_weak:Weak<App>)  {
    let rt = tokio::runtime::Runtime::new().unwrap();
   let res =  rt.block_on(async {
        let row_data = carton_work(text).await;
        app_weak
        .unwrap()
        .global::<TableView>()
        .set_row_data(row_data.into());
        // app_weak
        //     .unwrap()
        //     .global::<TableView>()

Replies: 7 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Vjze
Comment options

@ogoffart
Comment options

Answer selected by Vjze
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
a:widgets Implementation of widgets (from std-widgets.slint) and their styles (mF,bS)
5 participants
Converted from issue

This discussion was converted from issue #3156 on July 27, 2023 08:01.