summaryrefslogtreecommitdiffstats
path: root/doc/CrtObjCmd.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/CrtObjCmd.3')
-rw-r--r--doc/CrtObjCmd.319
1 files changed, 16 insertions, 3 deletions
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index 78fe6f8..0fe9611 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) @(#) CrtObjCmd.3 1.10 97/07/31 14:10:38
+'\" SCCS: @(#) @(#) CrtObjCmd.3 1.11 97/11/10 11:19:57
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
@@ -62,8 +62,10 @@ such that whenever \fIname\fR is
invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObj\fR)
the Tcl interpreter will call \fIproc\fR to process the command.
.PP
-\fBTcl_CreateObjCommand\fR will delete any command \fIname\fR
-already associated with the interpreter.
+\fBTcl_CreateObjCommand\fR deletes any existing command
+\fIname\fR already associated with the interpreter
+(however see below for an exception where the existing command
+is not deleted).
It returns a token that may be used to refer
to the command in subsequent calls to \fBTcl_GetCommandName\fR.
If \fIname\fR contains any \fB::\fR namespace qualifiers,
@@ -128,6 +130,17 @@ not modify them.
Call \fBTcl_SetObjResult\fR if you want
to return something from the \fIobjv\fR array.
.PP
+Ordinarily, \fBTcl_CreateObjCommand\fR deletes any existing command
+\fIname\fR already associated with the interpreter.
+However, if the existing command was created by a previous call to
+\fBTcl_CreateCommand\fR,
+\fBTcl_CreateObjCommand\fR does not delete the command
+but instead arranges for the Tcl interpreter to call the
+\fBTcl_ObjCmdProc\fR \fIproc\fR in the future.
+The old string-based \fBTcl_CmdProc\fR associated with the command
+is retained and its address can be obtained by subsequent
+\fBTcl_GetCommandInfo\fR calls. This is done for backwards compatibility.
+.PP
\fIDeleteProc\fR will be invoked when (if) \fIname\fR is deleted.
This can occur through a call to \fBTcl_DeleteCommand\fR,
\fBTcl_DeleteCommandFromToken\fR, or \fBTcl_DeleteInterp\fR,