![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.tcl archiveAgain: error in event handler while using BLT bgexec: global variable seems to vanish.
From: Robert Suetterlin <robert@mpe.mpg.de>
Date: Mon Sep 12 2005 - 14:37:46 CEST
I have a tcl programm that updates a blt plot according to selections I
The error occurs only if bgexec is running while I change my selection,
I have stripped down my program to a minimal working (i.e. breaking)
I do know that the idle worker as presented is not handling all updates
BTW. this happens with BLT2.4z, ActiveState ActiveTcl 8.4.11.1, on
Regards, Robert S.
foreach word $argv {
global widgets
set widgets(listbox) .l
listbox $widgets(listbox) -selectmode extended -yscrollcommand {$widgets(scrollbar) set}
set people [list Peter Paul Mary Caesar Herodes Nero Nena Nina Nonna]
pack $widgets(scrollbar) -side right -expand true -fill y
bind $widgets(listbox) <<ListboxSelect>> [list update_selection %W]
proc update_selection {W} {
foreach i [$W curselection] {
set dataset(selection) $selection
if {![info exists dataset(worker)]} {
return
proc update_worker {} {
blt::bgexec dataset(external) -onerror puts -onoutput puts tclsh84.exe external.tcl [join $dataset(selection)]
unset dataset(worker)
return
|