objects.instances
List object instances
|
Usage |
$object.instances(<class name:string>[,<flags>])
|
Description |
Returns an array with the instance handles of
of objects of the specified class. <flags> is a
string containing modifiers for the function behaviour.
If <flags> contains the letter "s" then
only unsubclassed instances of the specified
class are returned. This means that if B is
a subclass of A then when asked for instances
of A without the flag "s" this function will return
both instances of A and B, and with the flag "s"
this function will return only instances of A (and not B).
If the class name does not define a valid class
then an empty array is returned and a warning is
printed unless the "q" flag is used.
|
Syntax Specification |
<array> $object.instances(<class name:string>[,<flags:string>])
|
Examples |
foreach(%x,$objects.instances(object))
{
echo "OBJECT WITH CLASS" %x->$className() "AND NAME \""%x->$name()"\""
}
|
|
See also |
objects documentation
|