defaultStack | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Specifies which stack the expression this stack evaluates to, if no stack is specified in a statement. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Property: name Glossary: property, palette, error, return, editable window, statement, expression, evaluate, object reference, dialog box Message: shutdown Keyword: card, message box Object: stack Control Structure: function Function: topStack, stacks, menus, value, clickStack, mainStacks Command: call, import | ||||||
Description | Use the defaultStack property to ensure that actions are performed on the correct stack. If no stack is specified in a statement that applies to a stack, LiveCode assumes the defaultStack is the stack meant. For example, the following statement causes the defaultStack to move to its next card :
The expression this card refers to the current card of the defaultStack.
but the following statements are correct:
The defaultStack property is particularly useful in stacks opened in a mode other than an editable window (such as stacks that are being used as dialog boxes, palettes, or menus). LiveCode's message box and editing palettes set the defaultStack property to the value returned by the topStack function before performing a stack action. | ||||||
Tags | objects |