preserveVariables

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the preserveVariables to {true | false}
Synonymspreservevars
Summary

Specifies that the values of script-local variables should be preserved across recompilations of the script.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the preserveVariables to true
Values
NameTypeDescription
Value

The preserveVariables is true or false. By default, the preserveVariables is set to false.

RelatedCommand: local
Description

Set the preserveVariables to true to make LiveCode remember values of script-local variables across recompilation of the script. Script recompilation occurs when an object's script property is set. This property affects only variables at script scope, that do not have an initializer.

The preserveVariables property is provided as a background compatibility aid. It should not, in general, be used in user scripts as the IDE automatically handles preservation of variables via the Variable Preservation option in the preferences and Script Editor Script menu.

Tagsproperties