I am trying to create a starkit consisting of multiple tcl source files, which can be executed without problem on my machine with wish
. However, on trying to do the same with tclkit, I got this error from one of the second level source files sourced from the toplevel one directly sourced from main.tcl
.
unknown or ambiguous item type "waveform"
while executing
"$c create waveform 0 0 -sound snd -height $v(waveh) -width $v(cWidth) -tags [list obj wave] -debug $::debug -fill $v(wavColor) -limit $v(waveScale)"
invoked from within
"if $v(showWave) {
$c create waveform 0 0 -sound snd -height $v(waveh) -width $v(cWidth) -tags [list obj wave] -debug $::debug -fill $v(wavColor) ..."
(procedure "Redraw" line 28)
invoked from within
"Redraw all"
(procedure "resetDisplay" line 21)
invoked from within
"resetDisplay"
(file "MYAPPLICATION.vfs/TOPLEVEL.tcl" line 591)
waveform
is from snack
library, so I investigated it. The library does not have unresolved external dependency and the error would have occured much earlier if the library could not be used at all, so I have tried the following:
- Recompile
snack
library from source - Compile
snack
directly into the tclkit runtime (rather than as a lib in vfs) - Add
package require snack
again into the source file in question - Make my application a package in
lib
rather than in the direct vfs directory
None of the above works. The only working way I have found is to combine all the source files into one by substituting source
s. Therefore, I suspect this to be some kind of race condition, but I am neither able to prove it nor to debug it.
Sorry if I am missing anything important here (pretty new to tcl/tk). Would really appreciate any suggestions. Thanks very much in advance! :)