Menu item types

Adobe AIR 1.0 and later

Each entry in the menu data source (each XML element or JSON object) can specify an item type and type-specific information about the menu item it represents. Adobe AIR supports the following menu item types, which can be set as the values of the type attribute or property in the data source:

Menu item type

Description

normal

The default type. Selecting an item with the normal type triggers a select event and calls the function specified in the onSelect field of the data source. Alternatively, if the item has children, the menu item dispatches a preparing event, then a displaying event and then opens the submenu.

check

Selecting an item with the check type toggles the NativeMenuItem’s checked property between true and false values, triggers a select event, and calls the function specified in the onSelect field of the data source. When the menu item is in the true state, it displays a check mark in the menu next to the item’s label.

separator

Items with the separator type provide a simple horizontal line that divides the items in the menu into different visual groups.

A normal menu item is treated as a submenu if it has children. With an XML data source, this means that the menu item element contains other XML elements. For a JSON data source, give the object representing the menu item a property named items containing an array of other objects.

// Ethnio survey code removed