fn popup(sender: nwg::NoticeSender) -> thread::JoinHandle<String> {
        thread::spawn(move || {
            // Create the UI just like in the main function
            let app = YesNoDialog::build_ui(Default::default()).expect("Failed to build UI");
            nwg::dispatch_thread_events();
            
            // Notice the main thread that the dialog completed
            sender.notice();

            // Return the dialog data
            app.data.take().unwrap_or("Cancelled!".to_owned())
        })
    }
/// Create the dialog UI on a new thread. The dialog result will be returned by the thread handle.
/// To alert the main GUI that the dialog completed, this function takes a notice sender object.
Create the dialog UI on a new thread. The dialog result will be returned by the thread handle.
To alert the main GUI that the dialog completed, this function takes a notice sender object.
Create the dialog UI on a new thread . The dialog result will be returned by the thread handle . To alert the main GUI that the dialog completed this function takes a notice sender object .
fn popup(sender: nwg::NoticeSender) -> thread::JoinHandle<String> {
        thread::spawn(move || {
            // Create the UI just like in the main function
            let app = YesNoDialog::build_ui(Default::default()).expect("Failed to build UI");
            nwg::dispatch_thread_events();
            // Notice the main thread that the dialog completed
            sender.notice();
            // Return the dialog data
            app.data.take().unwrap_or("Cancelled!".to_owned())
        })
    }
fn popup ( sender : nwg :: NoticeSender ) -> thread :: JoinHandle < String > { thread :: spawn ( move | | { // Create the UI just like in the main function let app = YesNoDialog :: build_ui ( Default :: default ( ) ) . expect ( " " ) ; nwg :: dispatch_thread_events ( ) ; // Notice the main thread that the dialog completed sender . notice ( ) ; // Return the dialog data app . data . take ( ) . unwrap_or ( " " . to_owned ( ) ) } ) }
Create the dialog UI on a new thread.
Create the dialog UI on a new thread .
sender
nwg::NoticeSender