swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TCL/TK question


From: J. McKenzie Alexander
Subject: TCL/TK question
Date: Thu, 29 Nov 2001 18:06:03 -0800

I have a small tcl script which I would like to load into a swarm
application as a replacement for the standard control panel.  Normally, I've
done this in the past by calling

        [globalTkInterp eval: "source main.tcl"]

at the appropriate point in the program.  However, this tcl script uses
tabbed notebooks from the Iwidgets library, which Swarm doesn't load by
default.  In my program, I currently have the following lines:

        // Add the Itcl and Itk functionality to Swarm (I think)
        [globalTkInterp eval: "load /usr/lib/libitcl3.1.so"];
        [globalTkInterp eval: "load /usr/lib/libitk3.1.so"];
        // Now execute my script
        [globalTkInterp eval: "source main.tcl"];

When I run the program, I get the following error message:

(Tcl -eval:) namespace ".top59.tab61.canvas.tabset -command {namespace
inscope ::iwidgets::Tabnotebook {" not found in context "::"
    invoked from within
"unknown_pre_tclObjc $name $args"
    (procedure "unknown" line 6)
    invoked from within
"iwidgets::Tabset $itk_interior.canvas.tabset  -command [code $this
component notebook select]"
    (while creating component "tabset" for widget "::.top59.tab61")
    (object "::.top59.tab61" method "::itk::Archetype::itk_component" )
    invoked from within
"itk_component add tabset {
        iwidgets::Tabset $itk_interior.canvas.tabset  -command [code $this
component notebook select]
    } {
        keep -cursor
    }"
    while constructing object "::.top59.tab61" in
::iwidgets::Tabnotebook::constructor (body line 38)
    invoked from within
"::iwidgets::Tabnotebook .top59.tab61 -bevelamount 5 -height
270 -raiseselect 1 -tabpos n -width 305"
    ("uplevel" body line 1)
    invoked from within
"uplevel ::iwidgets::Tabnotebook $pathName $args"
    (procedure "::iwidgets::tabnotebook" line 2)
    invoked from within
"unknown_pre_tclObjc $name $args"
    (procedure "unknown" line 6)
    invoked from within
"::iwidgets::tabnotebook $base.tab61  -bevelamount 5 -height
270 -raiseselect 1 -tabpos n -width 305 "
    (procedure "vTclWindow.top59" line 68)
    invoked from within
"vTclWindow.top59 .top59 "
    ("eval" body line 1)
    invoked from within
"eval "vTclWindow$name $newname $rest""
    ("show" arm line 5)
    invoked from within
"switch $cmd {
        show {
            if {$exists} {
                wm deiconify $newname
            } elseif {[info procs vTclWindow$name] != ""..."
    (procedure "Window" line 11)
    invoked from within
"Window show .top59"
    (file "main.tcl" line 693)
    invoked from within
"source main.tcl"
while evaluating: source main.tcl


Clearly, I don't have something set up correctly.  What strikes me as
peculiar, though, is that the control panel loads perfectly if I type "wish
main.tcl" from a standard bash prompt.

I didn't attach the file so as to avoid needlessly sending stuff to the
list, but it can be found at http://evolve.lse.ac.uk/jalex/misc/main.tcl if
anyone is interested.

Any suggestions on how to fix this would be appreciated.

Thanks,

Jason

--
J. McKenzie Alexander
Co-ordinator, MSc Philosophy of the Social Sciences
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street
London WC2A 2AE


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]