tktable configure -variable

Help
2008-10-12
2013-05-08
  • 3rsdhiftcoder
    3rsdhiftcoder
    2008-10-12

    hi
    1.6x visual tcl
    linux

    this is my code for a toplevel with a tktable and a button.
    i am using the alias.
    it is a proc named xt and the xt proc is called by
    the button command window.

    why isnt the variable setting and the display updated?
    any ideas on what i am doing wrong?
    please offer assistance if you know.
    with wish8.5 i can use simple similar code and it runs fine
    (except i use pack instead of configure etc. )

    global widget

    array set cells {
        0,0 London 0,1 Reading
        0,2 Gloucester 0,3 Swindon
    }

    Toplevel1.Table1 configure -variable cells -rows 1 -cols 4

     
    • 3rsdhiftcoder
      3rsdhiftcoder
      2008-10-12

      finally i got it!

      i need to add a line at the beginning.
      global widget
      global cells
      ...

      basically what must be happening is vTcl couldnt see
      that array variable from inside the proc.

      i am such a idiot today :-(

      thanks.