propList()
Usage
-- 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, ...);
Description
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
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
enclose the data in square brackets (
variable. The variable's content is a list of the data.
Parameters
,
string1
string2
the list.
,
value1
value2
,
#symbol1
#symbol2
the elements in the list.
Example
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
See also
list()
476
Chapter 12: Methods
. To create a property list with a large amount of data,
propList()
[]
,
Optional. Strings that specify the name portions of the elements in
...
,
Optional. Values that specify the value portions of the elements in the list.
...
,
(Lingo only) Optional. Symbols that represent the name portions of
...
or
propList()
), put the data into a field, and then assign the field to a
(Lingo only), with or without
[:]
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers