AMEMBERS( ) Function

Example   See Also

Places the names of properties, procedures, and member objects for an object into a variable array.

Syntax

AMEMBERS(ArrayName, ObjectName | cClassName [, 1 | 2])

Returns

Numeric

Arguments

ArrayName

Specifies the array into which the names of the member properties for ObjectName are placed. If you specify the name of an array that doesn't exist, the array is automatically created. If the array isn't large enough to contain all the names, Visual FoxPro automatically increases the size of the array.

ObjectName

Specifies the object whose member properties are placed in the variable array specified with ArrayName. ObjectName can be any expression that evaluates to an object, such as an object reference, an object variable, or an object array element.

cClassName

Specifies the class whose member properties are placed in the variable array specified with ArrayName.

1

Specifies that the array contains the properties of the object as well as the methods and member objects. The resulting array is two-dimensional with the second column specifying what type of member is listed in the first column. The possible values for the second column are Property, Event, Method, or Object.

2

Specifies that the array contains the names of the objects that are members of the object specified with ObjectName. The resulting array is one-dimensional.

This option provides a method to determine the names of all Form objects in a form set or controls in a form.

Remarks

AMEMBERS( ) returns the number of objects, properties, and procedures for the object, or 0 if the array cannot be created. If you omit the optional 1 and 2 arguments, a one-dimensional array is created containing the properties for ObjectName.