PP.getEnumInterfMembers

Syntax

getEnumInterfMembers(object: Object|Function, asArray: Boolean);

Parameters

object. PP object, or a reference to a type.

asArray. Indicates how the data must be returned. If this parameters is set to True the data is obtained as an array, otherwise as a JSON object.

Description

The getEnumInterfMembers method returns all members of an interface or enumeration.

Comments

This method returns an array or object containing interface or enumeration members.

Example

To execute the example, add a link to PP.js scenario file to HTML page. Get all members of the PP.IDataSource interface and the PP.ControlState enum:

// Determine members of the PP.IDataSource interface
var interfaceElements = PP.getEnumInterfMembers(PP.IDataSource, True);
console.log("Members of the PP.IDataSource interface: " + interfaceElements);
// Determine members of the PP.ControlState enumeration
enumElements = PP.getEnumInterfMembers(PP.ControlState, False);
var result = "";
for (var i in enumElements) {
    var element = enumElements[i];
    if (PP.isMemberOf(enumElements, element)) {
        result += element;
        result += " "
    }
};
console.log("Members of the PP.ControlState enumeration: " + result);

After executing the example the browser console displays array of the PP.IDataSource interface members and the list of the PP.ControlState enum members:

Members of the PP.IDataSource interface: getData,getDimensions

Members of the PP.ControlState enumeration: Release Hover Press Active Disable

See also:

PP