summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-06-22 21:55:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-06-22 21:55:45 (GMT)
commit7dc2f698a1f0fa20b7989be0d73fd3c20b0e66fb (patch)
tree5426008105ff16d910ebd66eaa6ac746dca429b2 /doc
parent4c7792803aef1af6855d09024b037dc190bc249f (diff)
downloadtcl-7dc2f698a1f0fa20b7989be0d73fd3c20b0e66fb.zip
tcl-7dc2f698a1f0fa20b7989be0d73fd3c20b0e66fb.tar.gz
tcl-7dc2f698a1f0fa20b7989be0d73fd3c20b0e66fb.tar.bz2
Rebase for final implementation work
Diffstat (limited to 'doc')
-rw-r--r--doc/copy.n21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/copy.n b/doc/copy.n
index 100d564..8149397 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,20 @@ 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 where the object is
+going to be created in.
+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