Menus are an important and powerful component of Livecode World. They enable rapid visual coding without the need to develop GUI elements, and also encourage structural thinking, separation of concerns, and the ability to share code.
They are the: * Fastest way to sketch out ideas in code * Core to the MVC architecture * Important for re-use and learning
# Global and local scope There are two types of menu - Global Menus and Local Menus. Local menus can be called anything without clashing with a global namespace.
# Indexing menus
Menus are indexed in two ways according to their scope. Local menus are stored in a local custom property while global menus are stored in a flat global array.
The indexes are created using script_UpdateMenus command. This command contains the following key handlers: * script_MenuTitleTableArray * menu_DataArray * menu_SetGlobalTable
# Menus are MVC Controllers As you can see from the folder structure of LCW, Menu Stacks are stored in a standard folder called Controllers. This is because LCW considers all menus to be effectively a Livecode MVC Controller.
#