Updated 2013-10-24 00:40:56 by pooryorick

interp hide path exposedCmdName ?hiddenCmdName?

See Also  edit

interp expose
interp hidden
interp invokehidden
wrapping commands

Description  edit

Makes the exposed command exposedCmdName hidden, renaming it to the hidden command hiddenCmdName, or keeping the same name if hiddenCmdName is not given, in the interpreter denoted by path. If a hidden command with the targeted name already exists, this command fails. Currently both exposedCmdName and hiddenCmdName can not contain namespace qualifiers, or an error is raised. Commands to be hidden by interp hide are looked up in the global namespace even if the current namespace is not the global one. This prevents slaves from fooling a master interpreter into hiding the wrong command, by making the current namespace be different from the global one.

DKF: Be aware that this mechanism reportedly (according to comments in the code) doesn't work well with namespaces. Nobody's ever taken the time to explain why to me.

Lars H: Methinks one piece of the puzzle is that there is only one table of hidden commands per interpreter, whereas there is one table of exposed commands for every namespace. Is there any reason a table of commands cannot contain fully-qualified names? Bug 1835292 is probably relevant.

Category Command[Category Tcl syntax help]