use of [return] in a configbody script returns
TCL_RETURN (2) to the calling code
(Itcl_BiConfigureCmd()or ItclHandleConfig) which treats
anything but TCL_OK (0) as an error and so resets the
public variable. The result code (TCL_RETURN) is passed
back up the calling stack which doesn't treat this as
error. Itcl_BiConfigureCmd (itcl_bicmds.c) and
ItclHandleConfig (itcl_methods.c) need fixing to allow
the use of return in configbody scripts.
Also, if the public variable doesn't exist prior to an
error being thrown in an configbody script then it is
set to "" rather than being unset.
Logged In: YES
user_id=1157191
submiited patch to fix use of return in config body scripts
+ restore of old value on error
Patch to fix use of return in config body scripts
Tony, could you post some use case examples to show what is bad along with a what should be example? Thanks.