Welcome Visitors

Welcome to this Federated Wiki site about Livecode Menu stacks. These scriptonly stacks have essentially the same structure as LCW Controller stacks.

I'm still trying to figure out the exact relationship between the two. One thing is clear is that a menus title can change often and it makes no sense to try to encourage them to be globally unique. A LCW Controller on the other hand might find it useful to have a unique name.

# Uniqueness

It can take a long time to craft the code required to create the functionality for a menu-item, and even more for an entire menu. Experience has shown us that LCW Menus are useful in the short and long term - they are worth saving.

# Longevity

Their long lasting utitlity is because they are crafted without a GUI, and the are drafted in the context often f generic tooling. This leads to an abstraction of purpose. In addition, we find that individual menu-items are often required in a number of different menus.

# Menu-items

In consideration of these factors, Menu-items that are worth keeping should be stored as a LCW Controller, and these should have permanent names of global scope.

# LCW Controller

LCW Controllers shoud be naturally grouped according to the context they operate on. Thus controllers that operate on the scripts of any Livecode object should be grouped together.

The reason for this is that a new menu (or other tool) can be created form a collection of such items - and an author needs to be able to find what has already been created to see if they can usefully fork and reuse the code.

The context of a controller for a menu-item can most easily be determined by looking at the target of the controller - which maps to the first parameter of the handler. Therefore controllers that target script objects would have a second parameter labelled `sObject` and should all be placed in the same place where they can easily be searched - that implies their own wiki.

# LCW menu

A LCW Menu then becomes a collection of LCW Controllers wrapped in menu-items that determine the way the menu appears (the text of the menu-item displayed).

on menu_TestObject sObect put the name of sObect end menu_TestObject on menu_Graph sObect get lcw_GetController ("Graph Object", "sObject") put it into mController dispatch "Graph Object" to mController end menu_Graph on menu_GraphAgain sObect lcw_DoController "Graph Object", mController end menu_GraphAgain on menu_GraphObject sObect menu_Do sObect end menu_GraphObject

# Topics

# Activity Explore recent changes in the federation over the past few days, by exploring the links below: - Federation Activity - Drop in to our Fedwiki chat - riot.im


# Libraries

TITLE ^lib_

# Rosters Below we list some rosters that make navigation easier:

Livecode Sites ROSTER rest.livecode.world/livecode