mainStack | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | stack | ||||||
Summary | Specifies which main stack a substack belongs to. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Property: name, substacks, stackFiles Message: mainStackChanged Keyword: string, file Glossary: property, substack, stack file, main stack, prompt, object reference Function: files, stacks, mainStacks Command: revert Object: stack | ||||||
Description | Use the mainStack property to organize stacks in files. Each LiveCode file contains either a single main stack, or a main stack and one or more substacks. You can use this capability to bundle several related stacks into a single file for easy distribution, or to organize the stacks into categories, or to allow several stacks to inherit properties from the same main stack. The mainStack of a stack file is the main stack in that file. (Each stack file can have only one main stack.) The mainStack of a main stack is itself. The mainStack of a substack is the main stack in that substack's file. Changing a stack's mainStack property moves it into the same file as the specified main stack. The stack becomes a substack of the specified mainStack. Changing a substack's mainStack property to itself makes the substack into an independent main stack (and removes it from the original main stack's substacks property). The next time you save the stack, LiveCode will prompt you for a file name and location for the stack. You can set the mainStack property of a stack to the name of any open stack.
| ||||||
Tags | objects |