-- Lingo syntax propList() [:] propList(string1, value1, string2, value2, ...) propList(#symbol1, value1, #symbol2, value2, ...) [#symbol1:value1, #symbol2:value2, ...] // JavaScript syntax propList(); propList(string1, value1, string2, value2, ...);
Top level function; creates a property list, where each element in the list consists of a name/value pair.
When creating a property list using the syntax propList() or [:] (Lingo only), with or without parameters, the index of list values begins with 1.
The maximum length of a single line of executable script is 256 characters. Large property lists cannot be created using propList(). To create a property list with a large amount of data, enclose the data in square brackets ([]), put the data into a field, and then assign the field to a variable. The variables content is a list of the data.
string1, string2, ... Optional. Strings that specify the name portions of the elements in the list.
value1, value2, ... Optional. Values that specify the value portions of the elements in the list.
#symbol1, #symbol2, ... (Lingo only) Optional. Symbols that represent the name portions of the elements in the list.
This statement creates a property list with various properties and values, and then displays the various property values in the Message window:
-- Lingo syntax
-- using propList()
colorList = propList(#top,"red", #sides,"blue", #bottom,"green")
-- using brackets
colorList = [#top:"red", #sides:"blue", #bottom:"green"]
put(colorList.top) -- "red"
put(colorList.sides) -- "blue"
put(colorList.bottom) -- "green"
// JavaScript syntax
var colorList = propList("top","red", "sides","blue", "bottom","green");
put(colorList.top); // red
put(colorList.sides); // blue
put(colorList.bottom); // green