reordering execution of simulation callback after deletion of execute(win_path,$id)_simulate_id

This commit is contained in:
stefan schippers 2024-03-08 22:29:53 +01:00
parent ddcac8c69c
commit bbba395582
1 changed files with 8 additions and 5 deletions

View File

@ -291,17 +291,20 @@ proc execute_fileevent {id} {
if { ![info exists err] } { set err {} }
set execute(error,last) $err
set execute(status,last) $execute(status,$id)
if {[info exists execute(callback,$id)] && $execute(callback,$id) ne {}} {
# puts $execute(callback,$id)
# puts $execute(win_path,$id)
eval uplevel #0 [list $execute(callback,$id)]
}
if { [info exists tctx::$execute(win_path,$id)_simulate_id] } {
if { [set tctx::$execute(win_path,$id)_simulate_id] eq $id } {
unset tctx::$execute(win_path,$id)_simulate_id
}
}
if {[info exists execute(callback,$id)] && $execute(callback,$id) ne {}} {
# puts $execute(callback,$id)
# puts $execute(win_path,$id)
eval uplevel #0 [list $execute(callback,$id)]
}
catch {unset execute(callback,$id)}
if { ![info exists exit_status] } { set exit_status 0 }
unset execute(pipe,$id)
unset execute(data,$id)