[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tk and ns
On Tue, 06 Apr 1999 23:20:00 EDT, Juana Elias Nakfour wrote:
>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)
Ns doesn't include Tk so your approach won't work.
You might be able to dynamically load it, but that might require
Much Hacking.
-John Heidemann