Edit in GitHubLog an issue

MenuItems

A collection of menu items.

Instance

Read Only

Number length

The number of objects in the collection.

Methods

MenuItem add( MenuAction associatedMenuAction, LocationOptions at, MenuElement reference, Object withProperties )

Creates a new menu item.

Parameters

TypeNameDescription
MenuAction
associatedMenuAction
The menu action that implements the menu item.
LocationOptions
at
The location of the menu item relative to the reference object or within the containing object. (Optional)
MenuElement
reference
The reference object. Note: Required when the at parameter specifies before or after. (Optional)
Object
withProperties
Initial values for properties of the new MenuItem (Optional)

Number count()

Displays the number of elements in the MenuItem.


MenuItem item( Mixed index )

Returns the MenuItem with the specified index or name.

Parameters

TypeNameDescription
Mixed
index
The index or name. Can accept: Long Integer or String.

MenuItem itemByName( String name )

Returns the MenuItem with the specified name.

Parameters

TypeNameDescription
String
name
The name.

MenuItem itemByID( Number id )

Returns the MenuItem with the specified ID.

Parameters

TypeNameDescription
Number
id
The ID.

MenuItem itemByRange( Mixed from, Mixed to )

Returns the MenuItems within the specified range.

Parameters

TypeNameDescription
Mixed
from
The MenuItem, index, or name at the beginning of the range. Can accept: MenuItem, Long Integer or String.
Mixed
to
The MenuItem, index, or name at the end of the range. Can accept: MenuItem, Long Integer or String.

MenuItem firstItem()

Returns the first MenuItem in the collection.


MenuItem lastItem()

Returns the last MenuItem in the collection.


MenuItem middleItem()

Returns the middle MenuItem in the collection.


MenuItem previousItem( MenuItem obj )

Returns the MenuItem with the index previous to the specified index.

Parameters

TypeNameDescription
MenuItem
obj
The index of the MenuItem that follows the desired MenuItem.

MenuItem nextItem( MenuItem obj )

Returns the MenuItem whose index follows the specified MenuItem in the collection.

Parameters

TypeNameDescription
MenuItem
obj
The MenuItem whose index comes before the desired MenuItem.

MenuItem anyItem()

Returns any MenuItem in the collection.


MenuItem everyItem()

Returns every MenuItem in the collection.


String toSource()

Generates a string which, if executed, will return the MenuItem.


MenuItem []( Number index )

Returns the MenuItem with the specified index.

Parameters

TypeNameDescription
Number
index
The index.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.