Menu

stripchart in slave interp

Help
S.C.H
2007-03-09
2013-04-30
  • S.C.H

    S.C.H - 2007-03-09

    I am unable to create a stripchart in a slave interp using Tcl 8.4.x on in Windows XP.
    # this works in the main wish interp
        package require BLT
        set sc [blt::stripchart .sc]
        pack $sc

    # this does not work
        set slv [interp create]
        $slv eval {package require BLT}
        $slv eval {blt::stripchart .sc} ;# <--- returns "invalid command name blt::stripchart"
        $slv eval {pack $sc}

    Any reason this should not work?

     
    • George A. Howlett

      By default, slave interps don't contain Tk commands.  The
      "package require BLT" command is loading BLT commands that don't
      require Tk.

      set slv [interp create]
      $slv eval {
          package require Tk
          package require BLT
          blt::stripchart .sc
          pack .sc
      }

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.