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

OTcl



Hi,

I'm trying to do a simple thing in OTcl (instantiate a new variable in a
node) and can't get it to work.  

I only make 2 changes, both to the file ns-2/tcl/lib/ns-node.tcl:
1) adding a and initializing to 0 a field called 'newField_' into the
init function (this isn't a problem, it compiles and runs fine with just
this)
2) adding a function which changes the newField_ variable to a new
value. (if this code is added, then at runtime my program breaks right
away.  It still compiles fine, however.)

This is the code for my new function, which is based on how the other
functions in this file are written:

Node instproc setNewField thisValue{
	$self instvar newField__
	set newField_ $thisValue
}

Any ideas would be greatly appreciated!!
Thanks,
Lori