SpecTcl building dialogs fro Scilab

  • Nobody/Anonymous

    Hello there,

    I'm new to Tcl/Tk, and I would like to use this scripting toolkit to create dialogs for Scilab.

    But I have a problem: the tcl code generated by SpecTcl does not work within Scilab. I think that the reason is the management of the main window. The documentation of Scilab says :

    Because Scilab manages the tcl/tk events, it creates the root window  ".", this window should not be destroyed nor directly used by your tcl/tk scripts. You should thus always create your own toplevel windows.

    Here is an example given in the Scilab package :

    # vscale.tcl --
    # This demonstration script shows an example with a vertical scale.
    # SCCS: @(#) vscale.tcl 1.4 97/03/02 16:28:34

    set w .vscale
    catch {destroy $w}
    toplevel $w
    wm title $w "Vertical Scale Demonstration"
    wm iconname $w "vscale"

    What do I have to modify in the script generated by SpeTcl to have it working with Scilab ?

    Is there a way to avoid modifying this script, as it will be overwriten by SpecTcl at any change in the dialog ? Could it be possible to encapsulate it in another script called from Scilab ?

    Thank's for your help,


    • sam

      sam - 2003-03-26

      Hi Frederic,

      I'm new to this forum; I just downloaded SpecTcl (yesterday)   to also create  guis fo Scilab. When reading the documentation for Scilab concerning the Tcl/Tk interface, I noticed also the same paragraph on  "creating your own toplevel window".

      I just started learning Tcl/Tk and I was wondering if you were able to get the script generated by SpecTcl to work in Scilab?

      Thanks a lot,



Log in to post a comment.