diff options
-rw-r--r-- | doc/copy.n | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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,14 @@ 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 +\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. +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 |