From 2f663e09384d7d90974294e1bfe71f12b9f895c8 Mon Sep 17 00:00:00 2001 From: aleteoryx Date: Sun, 10 Nov 2024 16:45:35 -0500 Subject: [PATCH] update main --- main.tcl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.tcl b/main.tcl index ade147e..1f8b22a 100755 --- a/main.tcl +++ b/main.tcl @@ -30,7 +30,8 @@ proc start_thread {name} { threads::manage $thread tclircc::$name thread::send $thread [list variable path $path version $version] - if {[thread::send $thread [list source [file join $path $name main.tcl]] result] == 1} { + if {[thread::send $thread \ + [list source [file join $path $name main.tcl] ] result] == 1} { ${log}::critical "couldn't start $name thread: $result" exit -1 } @@ -52,8 +53,12 @@ start_thread ui plugins::load [file join $path testplugin] ${log}::debug "opening initial window..." -thread::send [t::ns tclircc::ui] {mk_toplevel name; return $name} initial -${log}::debug "initial window opened: $initial" +t::exec tclircc::ui { + mk_toplevel name + expr {$name} +} { + ${log}::debug "initial window opened: $result" +} ${log}::info "entering event loop" vwait nil -- 2.45.2