Users will not normally directly create instances of EZLists, but only use it through its subclasses. It provides the basic mechanisms for EZListView and EZPopUpMenu.
Set/get the global function to be performed in addition to the item functions: { arg listObj; value }
.
Set/get an Array of Associations including the labels and the item functions: ['label' -> { arg listObj; value }, ]
.
In menus, the macOS graphics system gives special meanings to some characters. See PopUpMenu ; Or and Array Symbols (if you are only using globalAction
). Arrays of Symbols will get converted into and array of Associations with and empty Function ['label' -> {}, ]
.
the item label of the current selection.
the item function of the current selection.
Adds an item.
name |
An instance of String or Symbol. The name of the list/menu item. |
action |
An instance of Function. |
Inserts a list/menu item at index position.
index |
An Integer. The index where to insert an item. |
name |
An instance of String or Symbol. The name of the list/menu item. |
action |
An instance of Function. |
Replace a list/menu item at index position.
index |
An Integer. The index where to insert an item. |
name |
An instance of String or Symbol. The name of the list/menu item. Default is the current item label. |
action |
An instance of Function. Default is the current item action. |
Removes a list/menu item at index position.
index |
An Integer. The index where to remove an item. |
Removes both the view, label and the list/menu from the parent view.
Gets/sets the list/menu to the index at value. Does not perform the action.
val |
An Integer. |
Sets the value and performs the action at the index value and the global action.
val |
An Integer. |
Performs the action at the current index and the global action.
Called by init and overridden by all subclasses. This is where the class specific views are built.