summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-06-13 12:28:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-06-13 12:28:35 (GMT)
commit9a0f3fc06f63ce3a77d1257877bc079fa5d33d99 (patch)
treed0c5c22453d016bf52da864e549156ddbe9f4b85 /doc
parentc90a3679053d6959325eb3041f0b9b6fd011625e (diff)
downloadtcl-oo_copy_ns.zip
tcl-oo_copy_ns.tar.gz
tcl-oo_copy_ns.tar.bz2
Improve docs, add tests, fix a corner case in the implementation.oo_copy_ns
Diffstat (limited to 'doc')
-rw-r--r--doc/copy.n10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/copy.n b/doc/copy.n
index 1bd0adb..8149397 100644
--- a/doc/copy.n
+++ b/doc/copy.n
@@ -22,10 +22,16 @@ 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 and
+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 \fItargetObject\fR or \fItargetNamespace\fR is omitted, a new name is chosen.
+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