Problem: While executing NAM in NS2 following error appears.
nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox
%W yview scroll [expr {- (%D)}] units
}
bind Li..."
Solution:
- Download "tk-8.4-lastevent.patch" patch file from http://bugs.gentoo.org/show_bug.cgi?id=225999
- Save the file in tk8.4.x floder (remember that there could be tk8.4.14 or tk8.4.18)
- Patch the file with this command
patch -p1 < ./tk-8.4-lastevent.patch
4. install again (with ./install command)
Now it works perfectly.
(If there is a problem on patching, change -p1 to -p0. )
12 comments:
thanks a lot.....it works.....
It works! Thanks a lot.
yeah... it works! thanks a lot for sharing.
you are the master, it really works, thanks
I did not know how to actually apply a patch.
The above steps worked with -p0 for me. Thank you.
hi
i wrote a new agent and modified the relevant files (makefile,packet.h,ns-default.tcl ) ,then i make clean and make the ns-2.34 i get this error (no rule to make target 'vanet.o' needed by ns) and when i want to run my tcl file i get this error (ns: [code ommited because of length] : invalid command name "Agent/Vanet" while executing "Agent/Vanet set packetSize_ 64").
will u pls help me out with this error.
i appreciate any help.
ps: tcl/tk 8.4.18 have already been installed.
I have fedora 10 with ns-2.32 and have the same problem. I have tcl and tk8.4.15 and it does not work properly. I also followed step of Badar Abbas from fedora forum but that too did not worked. Any idea for ns-2.32.
Sorry, I didn't work with ns-2.32. But, if you see the pach code carefully, you may solve the problem. Good luck.
sir I tried this path on ns2.29 on ubuntu 10.04 but it says
ns-allinone-2.29/tk8.4.11$ patch -p1 < ./tk-8.4-lastevent.patch
(Stripping trailing CRs from patch.)
patching file tk.h
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 635.
1 out of 1 hunk FAILED -- saving rejects to file tk.h.rej
what is the solution
Hi Rohini,
You are applying wrong patch. A hunk fails if it doesn't match with the original file. Different version of NS-2 has different code. So, you have to select appropriate patch, or you have to change the code. Check the line number and piece of code in the patch.
Hi everyone,
I have the same issue, When I tried install the patch in Opensuse 12.2:
/usr/src/ns-allinone-2.31/tk8.4.14 # patch -p0 < ./tk-8.4-lastevent.patch
the following message appears: If 'patch' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf patch
Any suggest? The folder is correct?
Excuse my poor English,regards Diego.
Post a Comment