2
'\" Copyright (c) 1993-1998 Lucent Technologies, Inc.
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
.TH find n 3.0 itcl "[incr\ Tcl]"
10
'\" Note: do not modify the .SH NAME line immediately below!
12
itcl::find \- search for classes and objects
14
\fBitcl::find \fIoption\fR ?\fIarg arg ...\fR?
19
The \fBfind\fR command is used to find classes and objects
20
that are available in the current interpreter. Classes and objects
21
are reported first in the active namespace, then in all other
22
namespaces in the interpreter.
24
The \fIoption\fR argument determines what action is carried out
25
by the command. The legal \fIoptions\fR (which may be abbreviated)
28
\fBfind classes ?\fIpattern\fR?
30
Returns a list of [incr Tcl] classes. Classes in the current
31
namespace are listed first, followed by classes in all other
32
namespaces in the interpreter. If the optional \fIpattern\fR
33
is specified, then the reported names are compared using the rules
34
of the "\fBstring match\fR" command, and only matching names are
38
If a class resides in the current namespace context, this command
39
reports its simple name--without any qualifiers. However, if the
40
\fIpattern\fR contains \fB::\fR qualifiers, or if the class resides
41
in another context, this command reports its fully-qualified name.
42
Therefore, you can use the following command to obtain a list where
43
all names are fully-qualified:
46
itcl::find classes ::*
50
\fBfind objects ?\fIpattern\fR? ?\fB-class \fIclassName\fR? ?\fB-isa \fIclassName\fR?
52
Returns a list of [incr Tcl] objects. Objects in the current
53
namespace are listed first, followed by objects in all other
54
namespaces in the interpreter. If the optional \fIpattern\fR is
55
specified, then the reported names are compared using the rules
56
of the "\fBstring match\fR" command, and only matching names are
58
If the optional "\fB-class\fR" parameter is specified, this list is
59
restricted to objects whose most-specific class is \fIclassName\fR.
60
If the optional "\fB-isa\fR" parameter is specified, this list is
61
further restricted to objects having the given \fIclassName\fR
62
anywhere in their heritage.
65
If an object resides in the current namespace context, this command
66
reports its simple name--without any qualifiers. However, if the
67
\fIpattern\fR contains \fB::\fR qualifiers, or if the object resides
68
in another context, this command reports its fully-qualified name.
69
Therefore, you can use the following command to obtain a list where
70
all names are fully-qualified:
73
itcl::find objects ::*
77
class, object, search, import