index
Type: Integer
Availability: Read-only at run time only
The index property of the MenuItem class is used only when menu items are created by logic; that is, when they are cloned by calling the loadMenu or loadSubMenu method.
Logic calling the loadMenu or loadSubMenu method passes a unique identifier (id) that is assigned to the created menu, which is usually an index value stored in the index property. As this property is read-only, any attempt to change the value is rejected.
You can also use the value of the index property to distinguish between menu items passed to the same menu click or select event method defined for the base menu item and used by all menu items cloned from that menu. Most commonly, you would assign the index values sequentially, using them like indexes.
The index property of menus created in the JADE Painter is set to zero (0).