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

Tk and ns



Hi everyone,

	I am trying simply to use Tk commands in a tcl file and running it 
under ns. Just inorder to create A graphical interface for my simulations.
I want something more then nam can offer. 
I type in something like:
-------------------
button .text -text Hello -command {puts "Hello, World"}
pack .hello -padx 10 -pady 10
---------------------

somewhere in my tcl file then I run : ns file.tcl
I get the following:

--------------------
invalid command name "button"
    while executing
"button .hello -text Hello\
        -command {puts stdout "Hello, World!"}"
    (file "wlan.tcl" line 229)
-----------------------------

at the ns prompt I type:
 % man button

and it will give me a whole description of what the command button does.
I don't understand why ns can give me a man page on button and yet I
cannot use it. Should I include something in my tcl file. Thanks in
advance. (I am using Solaris and ns-2.1b5)





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Juana Nakfour                          | URL: www.cse.msu.edu/~nakfourj             
Graduate Assistant                     | Address: 201 N. Pennsylvania 
Computer Science and Engineering Dept. |          Lansing, MI 48912. 
Michigan State University	       | Phone: (517) 487 9031	
                         "F1 all the way.............."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~