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

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



Thank you Haobo,

Page No 18 of lecture "Extending NS" at IEC'2000 ns workshop, June 2000, San
Diego
gives me a great help.

J,


----- Original Message -----
From: "Haobo Yu" <[email protected]>
To: "Lee, Jiwoong" <[email protected]>
Cc: <[email protected]>
Sent: Friday, November 24, 2000 3:49 AM
Subject: 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
> >
> >
> >
> >
> >
>
>