stack

Typeobject
DictionaryLCS
LibraryLiveCode Script
Syntax
stack
Synonymswindow,wd
Summary

The basic LiveCode object: a window.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
go to stack "Help"
put the short name of stack 3 after field "Stacks List"
RelatedKeyword: templateStack
Property: mode, defaultStack, style
Command: topLevel, go, modal, palette, modeless
Function: revLoadedStacks, mouseStack
Glossary: stack version, object, property, dialog box, command, object type
Object: stack
Description

Use the stack object type to display a window, palette, or dialog box.

A stack corresponds to a single window. Each LiveCode file contains one or more stacks. The first stack in a stack file is called the main stack; any other stacks in the stack file are called substacks of the main stack.

Stacks contain one or more cards, and may optionally contain backgrounds.

Note: The type of window a stack is displayed in depends on the stack's style property and whether the stack was opened with the go, topLevel, palette, modal, or modeless command.

Tagsobjects
TypeNameSummarySyntax
commandiphoneSetReachabilityTarget

Starts monitoring a server of reachability via the network.

iphoneSetReachabilityTarget <hostNameOrAddress>

- - -iphoneSetRedrawInterval

Synchronizes LiveCode redraws with the device's refresh rate.

iphoneSetRedrawInterval <frameInterval>

- - -mobileAdSetTopLeft

Sets the topLeft position of an ad.

mobileAdSetTopLeft <adName>, <topLeft>

- - -mobileAdSetVisible

Specifies whether an ad can be seen or is hidden.

mobileAdSetVisible <ad>, <visible>

functioniphoneReachabilityTarget

Returns the server currently being monitored

iphoneReachabilityTarget

- - -mobileAdGetTopLeft

Returns the topLeft position of an ad.

mobileAdGetTopLeft (<adName>)

- - -mobileAdGetVisible

Return true if an ad is visible.

mobileAdGetVisible(<ad>)

- - -mobileAds

Return a list of all mobile ads that have been created.

mobileAds()

messageerrorDialog

Sent to an object when one of its handlers cannot be run due to an execution error.

errorDialog <pExecutionError>, <pParseError>

- - -libraryStack

Sent to a stack when it is placed in the message path by the start using command.

libraryStack

- - -localNotificationReceived

Sent when the application receives a local notification from the operating system.

localNotificationReceived <pMessage>

- - -mainStackChanged

Sent to a stack when its mainStack is changed.

mainStackChanged

- - -mobileStandaloneSaved

Sent to the mainstack after it has been saved as a mobile standalone application or the simulation was started.

mobileStandaloneSaved <pTargetType>, <pAppBundle>

- - -mouseDoubleDown

Sent when the user double-clicks.

mouseDoubleDown <pButtonNumber>

- - -mouseDoubleUp

Sent when the mouse button is released at the end of a double-click.

mouseDoubleUp <pButtonNumber>

- - -mouseDown

Sent when the user presses the mouse button.

mouseDown <pButtonNumber>

- - -mouseEnter

Sent when the mouse pointer moves into an object.

mouseEnter

- - -mouseLeave

Sent when the mouse pointer moves out of an object.

mouseLeave

- - -mouseMove

Sent when the user moves the mouse.

mouseMove <pNewMouseH>, <pNewMouseV>

- - -mouseRelease

Sent when the user releases the mouse outside the control that was clicked.

mouseRelease <pButtonNumber>

- - -mouseStillDown

Sent periodically while the mouse button is being held down.

mouseStillDown <pButtonNumber>

- - -mouseUp

Sent when the user releases the mouse button.

mouseUp <pButtonNumber>

- - -mouseWithin

Sent periodically to an object while the mouse pointer is within its borders.

mouseWithin

- - -nameChanged

Sent to an object when its name is changed.

nameChanged <pOldName>, <pNewName>

- - -pushNotificationReceived

Sent when the application receives a push notification from a Push Notification Server.

pushNotificationReceived <pMessage>

- - -pushNotificationRegistered

Sent when the application registers to receive Push Notifications form a Push Notification Server.

pushNotificationRegistered <pSignature>

- - -pushNotificationRegistrationError

Sent when the application fails to register to receive Push Notifications form a Push Notification Server.

pushNotificationRegistrationError <pErrorMessage>

- - -reachabilityChanged

Sent when the network connectivity to a monitored server changes.

reachabilityChanged <pHostNameOrAddress>, <pReachabilityInfo>

- - -relaunch

After having launched an application, upon launching a successive instance the LiveCode engine will send a relaunch message to the first stack of the application.

relaunch <pCommandLineArguments>

- - -releaseStack

Sent to a stack when the stack is removed from the message path with the stop using command.

releaseStack

- - -reloadStack

Sent to a main stack when the user tries to open a main stack with the same name as a previously-opened stack.

reloadStack <pStackName>, <pFileName>

- - -savingMobileStandalone

Sent to the mainstack when a mobile standalone application is being saved or the simulation is started.

savingMobileStandalone <pTargetType>, <pAppBundle>

- - -savingStandalone

Sent to the mainstack when a standalone application is being saved.

savingStandalone

- - -selectedObjectChanged

Sent to an object when it is selected.

selectedObjectChanged

- - -socketClosed

Sent when the remote system closes a socket.

socketClosed <pSocketID>

- - -socketError

Sent when an error occurs on a socket that causes the socket to close or to fail to open.

socketError <pSocketID>, <pErrorString>

- - -socketTimeout

Sent when an open socket, read from socket or write to socket command halts for the time specified by the socketTimeoutInterval property.

socketTimeout <pSocketID>

- - -standaloneSaved

Sent to the mainstack after it has been saved as a standalone application.

standaloneSaved <pFolderSavedIn>

- - -startup

Sent to the first card opened when the application starts up.

startup <pMode>

propertyacceleratedRendering

Specifies whether to use accelerated rendering for this stack

set the acceleratedRendering of <stack> to { true | false }

- - -altID

Specifies an alternate ID for objects.

set the altID of <object> to <IDNumber>

- - -backgroundColor

Specifies an object's background color.

set the backgroundColor of <object> to {empty | <colorName> | <RGBColor>}

set the backgroundColor [of <chunk>] [of <line>] of <field> to {empty| <colorName> | <RGBColor>}

- - -backgroundIDs

Reports the backgrounds in a stack.

get the backgroundIDs of <stack>

- - -backgroundNames

Reports the backgrounds in a stack.

get the backgroundNames of <stack>

- - -backgroundPattern

The backgroundPattern specifies the pattern used to draw an object's background.

set the backgroundPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -backgroundPixel

Specifies which entry in the color table is used for an object's background color.

set the backgroundPixel of <object> to <colorNumber>

- - -behavior

Allows an object to inherit its script handlers from another object.

set the behavior of <object> to {<button> | <stack>}

- - -borderColor

Specifies the color of an object's border.

set the borderColor of <object> to {empty | <colorName> | <RGBColor>}

set the borderColor of <line> of <field> to {empty | <colorName> | <RGBColor>}

- - -borderPattern

Specifies the pattern of an object's border.

set the borderPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -borderPixel

Specifies which entry in the color table is used for the color of an object's border.

set the borderPixel of <object> to <colorNumber>

- - -borderWidth

Specifies the width of an object's border.

set the borderWidth of <object> to <pixelWidth>

set the borderWidth of <line> of <field> to <pixelWidth>

- - -bottom

Specifies how far an object's bottom edge is from the top of the window or screen.

set the bottom of <object> to <number>

- - -bottomColor

Specifies the color of a three-D object's lowered edge.

set the bottomColor of <object> to {empty | <colorName> | <RGBColor>}

- - -bottomLeft

Specifies the location of the specified object's lower left corner.

set the bottomLeft of <object> to <left>, <bottom>

- - -bottomPattern

Specifies the pattern of a three-D object's lowered edge.

set the bottomPattern of <object> to {empty | <patternNumber> | <imageID>}

- - -bottomPixel

Specifies which entry in the color table is used for the color of a three-D object's lowered edge.

set the bottomPixel of <object> to <colorNumber>

- - -bottomRight

Specifies the location of the specified object's lower right corner.

set the bottomRight of <object> to right,bottom

- - -cantAbort

Specifies whether the user can halt a handler with a key combination.

set the cantAbort of <stack> to {true | false}

- - -cantDelete

Specifies whether an object can be deleted.

set the cantDelete of {<card> | <group> | <stack>} to {true | false}

- - -cantModify

Specifies whether the user can make changes to a stack.

set the cantModify of <stack> to { true | false }

- - -cardIDs

Reports the cards in a stack or the cards that a specified group appears on.

get the cardIDs of {group | stack}

- - -cardNames

Lists the short name property of all the cards in a stack, or all the cards that contain a specified group.

get the cardNames of {group | stack}

- - -charSet

Indicates whether the Macintosh or ISO 8859 character set was used to enter a stack's text.

get the charSet of <stack>

- - -closeBox

Shows a window's close box.

set the closeBox of <stack> to {true | false}

- - -colors

Specifies all the colors of an object, in shorthand form.

set the colors of <object> to <colorsList>

- - -compositorCacheLimit

Specifies the maximum number of bytes the engine should use to cache content for the stack.

set the compositorCacheLimit of <stack> to <cacheLimit>

- - -compositorTileSize

Specifies the size the fragments of object images it caches should be.

set the compositorTileSize of <stack> to <tileSize>

- - -compositorType

Specifies which compositor is used when rendering a stack.

set the compositorType of <stack> to <compositorType>

- - -currentCard

The short name of the current card of a stack

get the currentCard of <stack>

set the currentCard of <stack> to <cardName>

- - -customKeys

Lists the names of all the custom properties of an object.

set the customKeys of <object> to {<propertiesList> | empty}

- - -customProperties

Specifies all the custom properties of an object that are in the current customPropertySet, along with their settings.

set the customProperties of <object> to <propertiesArray>

set the customProperties[<propertySet>] of <object> to <propertiesArray>

- - -customPropertySet

Specifies a set of custom properties applied to an object.

set the customPropertySet of object to {setName | empty}

- - -customPropertySets

Lists all the custom property sets that can apply to an object.

get the customPropertySets of <object>

- - -decorations

Specifies the window controls and appearance of a stack window.

set the decorations of <stack> to {<controlList> | <WDEF> | default | empty}

- - -destroyStack

Specifies whether a stack is purged from memory when it's closed, or whether it remains in memory.

set the destroyStack of <stack> to {true | false}

- - -destroyWindow

Specifies whether the memory used by a stack window is purged when the stack is closed.

set the destroyWindow of <stack> to {true | false}

- - -documentFilename

Specifies the file path to the file that the stack represents.

set the documentFilename of <stack> to <filename>

- - -draggable

Shows a stack's title bar.

set the draggable of <stack> to {true | false}

- - -dynamicPaths

Specifies whether the message path includes the current card and its owners.

set the dynamicPaths of <stack> to {true | false}

- - -editBackground

Specifies that any objects created should be added to the background.

set the editBackground of <stack> to {true | false}

- - -editMenus

Specifies that the menu bar appears at the top of the stack window.

set the editMenus of <stack> to {true | false}

- - -externalCommands

Lists the available external commands for a stack.

get the externalCommands of <stack>

- - -externalFunctions

Lists the available external functions for a stack.

get the externalFunctions of <stack>

- - -externalPackages

Lists the available external packages for a stack.

get the externalPackages of <stack>

- - -externals

Specifies a list of files containing external code that are to be loaded into memory when the stack opens.

set the externals of <stack> to <filePathsList>

- - -filename of stack

Reports the file path of the file a stack is stored in.

set the filename of <stack> to <filePath>

- - -focusColor

Specifies the color of the outline around the active control or the field with the insertion point.

set the focusColor of <object> to {empty | <colorName> | <RGBColor>}

- - -focusPattern

Specifies the pattern used for an object's outline when it has the insertion point or is active focused.

set the focusPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -focusPixel

Specifies which entry in the color table is used for the color of an object's outline when it has the insertion point or is active focused.

set the focusPixel of <object> to <colorNumber>

- - -foregroundColor

Specifies the color of object text and borders.

set the foregroundColor of <object> to {empty | <colorName> | <RGBColor>}

set the foregroundColor of [<chunk> of] <field> to {empty| <colorName> | <RGBColor>}

- - -foregroundPattern

Specifies the pattern used for object text and borders.

set the foregroundPattern of <object> to {<patternNumber> | <imageID> | empty}

set the foregroundPattern of [<chunk> of] <field> to {<patternNumber> | <imageID> | empty}

- - -foregroundPixel

Specifies which entry in the color table is used for an object's text and borders.

set the foregroundPixel of <object> to <colorNumber>

- - -formatForPrinting

Specifies whether font layout is done using printer fonts or screen fonts.

set the formatForPrinting of <stack> to {true | false}

- - -freeSize

Always reports zero and is included in LiveCode for compatibility with imported HyperCard stacks.

get the freeSize of <stack>

- - -fullscreen

Specifies whether a stack window takes up the entire screen.

set the fullscreen of <stack> to { true | false }

- - -HCAddressing

Determines whether grouped fields and card buttons are assumed if the field or button's domain is not specified.

set the HCAddressing of <stack> to {true | false}

- - -HCStack

Reports whether a stack was originally imported from HyperCard.

get the HCStack of <stack>

- - -height

Specifies the distance from an object's top edge to its bottom edge.

set the height of <object> to <numberOfPixels>

- - -hiliteColor

Specifies the color of the background when an object, or text in an object, is highlighted.

set the hiliteColor [of <object>] to {empty | <colorName> | <RGBColor>}

- - -hilitePattern

Specifies the fill pattern used for the background when an object, or text in an object, is highlighted.

set the hilitePattern of <object> to {<patternNumber> | <imageID> | empty}

- - -hilitePixel

Specifies which entry in the color table is used for the background color when an object, or text in an object, is highlighted.

set the hilitePixel of <object> to <colorNumber>

- - -iconic

Specifies whether a stack window is minimized.

set the iconic of <stack> to {true | false}

- - -ID

Reports the unique ID number assigned to an object.

set the ID of {image | stack} to <number>

get the [{ long | abbreviated | short }] ID of <object>

- - -invisible

Specifies whether an object is hidden.

set the invisible of <object> to {true | false}

get the [effective] invisible of <object>

- - -label

Specifies the string shown in a stack window's title bar, or a text label to be displayed on the specified object if its showName property is true.

set the label of <object> to <labelString>

- - -layer

Specifies the back-to-front order of objects on a card or the order of cards in a stack.

set the layer of <object> to {<layerNumber> | top | bottom}

- - -left

Specifies how far an object's left edge is from the left edge of the window or screen.

set the left of <object> to <numberOfPixels>

- - -liveResizing

Causes a stack window to display its contents changing during resizing, instead of redrawing the contents after the window is resized.

set the liveResizing of <stack> to {true | false}

- - -location

Specifies where an object is.

set the location of <object> to <point>

- - -mainStack

Specifies which main stack a substack belongs to.

set the mainStack of <stack> to <mainStack>

- - -maxHeight

Specifies how tall a stack window can be made when it's being resized.

set the maxHeight of <stack> to <pixels>

- - -maxWidth

Specifies how wide a stack window can be made when it's resized.

set the maxWidth of <stack> to <pixels>

- - -menubar

Specifies the name of a menu bar to use when a stack is frontmost.

set the menubar of <stack> to {<groupname> | empty}

- - -metal

Displays a window with a textured-metal appearance.

set the metal of <stack> to {true | false}

- - -minHeight

Specifies how short a stack window can be made when it's resized.

set the minHeight of <stack> to <pixels>

- - -minimizeBox

Shows a window's minimize box or collapse box.

set the minimizeBox of <stack> to {true | false}

- - -minStackFileVersion

Get the minimum stack file version for a stack that will allow it to be safely saved without data loss.

get the minStackFileVersion of <stack>

- - -minWidth

Specifies how narrow a stack window can be made when it's resized.

set the minWidth of <stack> to <pixels>

- - -mode

Reports the type of window a stack is displayed in.

get the mode of <stack>

- - -modifiedMark

Specifies whether the modified indicator dot should be displayed on the close-box of a stack.

set the modifiedMark of <stack> to {true | false}

- - -name

Specifies the name of an object.

set the [{ long | abbreviated | short }] name of <object> to <string>

get the name

- - -number

Specifies an object's position within a file, a card's position within a stack, or a control's layer on a card.

set the number of <card> to <number>

get the number of <object>

- - -owner

Reports which object is next in the object hierarchy.

get the [{ long | abbreviated | short }] owner of <object>

- - -passKey

Enters a password for a locked stack, letting the user modify the stack.

set the passKey of <stack> to <passwordString>

- - -password

Specifies a password that the user must enter before making changes to the stack.

set the password of <stack> to {<passwordString> | empty}

- - -patterns

Specifies all the patterns of an object, in shorthand form.

set the patterns of <object> to <patternsList>

- - -pixmapID

Specifies the ID of the data structure the operating system uses to hold the screen image of the current card.

get the pixmapID of <stack>

- - -properties

Specifies some of an object's properties and their current values.

set the properties of <object> to <propertiesArray>

- - -recentCards

Reports the long ID properties of recently visitedcards.

get the recentCards [of <stack>]

- - -recentNames

Reports a list of the most recently visited cards, in reverse order.

get the recentNames [of <stack>]

- - -rectangle

Specifies the area within which an object is drawn.

set the rectangle of <object> to <left>, <top>, <right>, <bottom>

get the [effective] rectangle of <object>

- - -resizable

Specifies whether the user can resize a stack window.

set the resizable of <stack> to {true | false}

- - -right

Specifies how far an object's right edge is from the left edge of the window or screen.

set the right of <object> to <pixels>

- - -screen

Returns the screen number that the stack is on. The number corresponds to the line of the rect of the screen returned by the screenrects.

put the screen of <stack>

- - -script

Specifies the contents of an object's script.

set the script of <object> to <string>

- - -scriptOnly

Specifies whether the stack should be saved as script only which does not retain any objects or custom properties

set the scriptOnly of <stack> to { true | false }

- - -selected

Specifies whether an object is selected.

set the selected of <object> to {true | false}

- - -shadowColor

Specifies the color of an object's drop shadow or the background of a scrollbar.

set the shadowColor of <object> to {empty | <colorName> | <RGBColor>}

- - -shadowOffset

Specifies the size and direction of an object's drop shadow.

set the shadowOffset of <object> to <pixels>

- - -shadowPattern

Specifies the pattern of an object's drop shadow.

set the shadowPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -shadowPixel

Specifies which entry in the color table is used for the color of an object's drop shadow or the background of a scrollbar.

set the shadowPixel of <object> to <colorNumber>

- - -sharedGroupIds

Reports the ids of all the shared groups of the card or stack

get the sharedGroupIds of {<card> | <stack>}

- - -sharedGroupNames

Reports the names of all the shared groups of the card or stack

get the sharedGroupNames of {<card> | <stack>}

- - -showBorder

Specifies whether an outline is drawn around an object.

set the showBorder of <object> to {true | false}

- - -showFocusBorder

Displays a border around the active control.

set the showFocusBorder of <control> to {true | false}

- - -stackFiles

Specifies a list of stacks and their file names, to be used when a stack that's not open is referenced in a handler.

set the stackFiles of <stack> to <stackFileList>

- - -startUpIconic

Specifies whether, when a stack opens, it should be iconified or displayed as a window.

set the startupIconic of <stack> to {true | false}

- - -substacks

Specifies which stacks are associated with a main stack, and saved in the same file.

set the substacks of <stack> to <substacksList>

- - -systemWindow

Makes a window float above all running applications.

set the systemWindow of <stack> to {true | false}

- - -textFont

Specifies the font face of text in an object.

set the textFont of <object> to <fontName> [, <language>]

set the textFont of [<chunk> of] <field> to <fontName> [, <language>]

- - -textSize

Specifies the point size of text displayed by an object.

set the textSize of <object> to <pointSize>

set the textSize of [<chunk> of] <field> to <pointSize>

- - -textStyle

Specifies the style or styles applied to text in an object.

set the textStyle of <object> to {empty | plain | <stylesList>}

set the textStyle of [<chunk> of] <field> to {empty | plain | <stylesList>}

set the textStyle[<style>] of object to {true | false}

- - -threeD

Specifies whether an object appears to stick out of or recede into the screen.

set the threeD of <object> to {true | false}

- - -top

Specifies how far an object's top edge is from the top of the window or screen.

set the top of <object> to <numberOfPixels>

- - -topColor

Specifies the color of a three-D object's raised edge.

set the topColor of <object> to {empty | <colorName> | <RGBColor>}

- - -topLeft

Specifies the location of the specified object's upper left corner.

set the topLeft of <object> to left,top

- - -topPattern

Specifies the pattern used to draw a three-D object's raised edge.

set the topPattern of <object> to {<patternNumber> | <imageID> | empty}

- - -topPixel

Specifies which entry in the color table is used for the color of a three-D object's raised edge.

set the topPixel of <object> to <colorNumber>

- - -topRight

Specifies the location of the specified object's upper right corner.

set the topRight of <object> to <right>, <top>

- - -unicodeTitle

Specifies the string shown in a stack window's title bar as a unicode string.

set the unicodeTitle of stack to titleString

- - -visible

Specifies whether an object can be seen or is hidden.

set the [effective] visible of <object> to {true | false}

- - -width

The width of an object is the distance from its left edge to its right edge.

set the width of <object> to <numberOfPixels>

- - -windowID

Reports the operating system's ID for a stack window.

get the windowID of <stack>

- - -windowManagerPlace

Specifies whether a Unix window manager can automatically place a stack's window when the stack is opened.

set the windowManagerPlace to {true | false}

- - -windowShape

Specifies an image whose mask is used as the shape of the window.

set the windowShape of stack to {imageID | 0}

- - -zoomBox

Shows a window's zoom box.

set the zoomBox of <stack> to {true | false}