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

Re: [ns] [Q] Legitimate registration of a new Tcl code parts



(the simplest way is) you must put it in tcl/lib/ns-lib.tcl for it to be
included. Please read some later workshop slides (e.g. Polly's) on this. 

In fact all you need to do is to include that tcl in your sim script. No
need to recompile thatway. tcl is an interpreted language anyawy

On Thu, 23 Nov 2000, Lee, Jiwoong wrote:

> I wrote a new tcl code which should be compiled and merged into one ns
> executable file.
> Let's call it "NovelMethod.tcl" located in ~ns/tcl/lib directory.
> 
> I added the string "NovelMethod.tcl" into ~ns/Makefile and ~ns/Makefile.in,
> and the
> compile was successful.
> 
> However when I call a process in NovelMethod.tcl, NS dies with "catch
> error".
> When I put the whole code of NovelMethod.tcl into an already working tcl
> file, such as
> ~/ns/tcl/lib/ns-agent.tcl, NS properly works and returns no error.
> 
> I guess I missed something to register my new tcl file legitimately.
> Anybody can pinpoint the cause?
> 
> Thank you,
> 
> Jiwoong
> 
> 
> 
> 
>