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

[ns] making a variable tcl set-able




Hi All, 

Could someone point out the shortcoming in the following series of step to
make a variable set-able from tcl.

#In Class declaration
int dummyvar;

#In Class constructor
bind("dummyvar", &dummyvar);

#In a tcl-lib file (to avoid warnings)
Type/Name set dummyvar 1

#In tcl-script file
$object set dummyvar 0


This doesn't seem to work for me. If I do a 
puts "[$object set dummyvar]" 
before and after the set command,  it shows the 1 and 0 respectively,
which one would expect. But internally, in C++ code, it remains 1. 

Any help appreciated.

thanks,
	-ratul