summaryrefslogtreecommitdiffstats
path: root/doc/copy.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-06-26 19:22:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-06-26 19:22:29 (GMT)
commitc9a0c6154c53dac75feb2af5e5cacce15bf25b11 (patch)
tree0a89b0c488355cfedec38b203299ba311e5fee65 /doc/copy.n
parent6e375012383167dfecb749feba6af252ebcf3692 (diff)
parent40560f53a7756617375dab14d8499406ba3a92b4 (diff)
downloadtcl-c9a0c6154c53dac75feb2af5e5cacce15bf25b11.zip
tcl-c9a0c6154c53dac75feb2af5e5cacce15bf25b11.tar.gz
tcl-c9a0c6154c53dac75feb2af5e5cacce15bf25b11.tar.bz2
merge 8.6
Diffstat (limited to 'doc/copy.n')
-rw-r--r--doc/copy.n22
1 files changed, 16 insertions, 6 deletions
diff --git a/doc/copy.n b/doc/copy.n
index 100d564..789a76c 100644
--- a/doc/copy.n
+++ b/doc/copy.n
@@ -14,7 +14,7 @@ oo::copy \- create copies of objects and classes
.nf
package require TclOO
-\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR?
+\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? ?\fItargetNamespace\fR?
.fi
.BE
.SH DESCRIPTION
@@ -22,11 +22,21 @@ package require TclOO
The \fBoo::copy\fR command creates a copy of an object or class. It takes the
name of the object or class to be copied, \fIsourceObject\fR, and optionally
the name of the object or class to create, \fItargetObject\fR, which will be
-resolved relative to the current namespace if not an absolute qualified name.
-If \fItargetObject\fR is omitted, a new name is chosen. The copied object will
-be of the same class as the source object, and will have all its per-object
-methods copied. If it is a class, it will also have all the class methods in
-the class copied, but it will not have any of its instances copied.
+resolved relative to the current namespace if not an absolute qualified name
+and
+.VS TIP473
+\fItargetNamespace\fR which is the name of the namespace that will hold the
+internal state of the object (\fBmy\fR command, etc.); it \fImust not\fR
+refer to an existing namespace.
+If either \fItargetObject\fR or \fItargetNamespace\fR is omitted or is given
+as the empty string, a new name is chosen. Names, unless specified, are
+chosen with the same algorithm used by the \fBnew\fR method of
+\fBoo::class\fR.
+.VE TIP473
+The copied object will be of the same class as the source object, and will have
+all its per-object methods copied. If it is a class, it will also have all the
+class methods in the class copied, but it will not have any of its instances
+copied.
.PP
.VS
After the \fItargetObject\fR has been created and all definitions of its