Using Director > Writing Scripts with Lingo > Using lists > Creating property lists

 

Creating property lists

The only way to create a property list is to use the list operator ([ ]). You cannot use the list() function to create a property list.

To create a property list:

Place the list elements within the list operator, and use commas to separate the elements. Precede each property with the pound (#) sign, and separate each property from its value with a colon.

For example, the following statements create two different property lists. Each list specifies the Stage coordinates of a sprite.

sprite1Location = [#left:100, #top:150, #right:300, #bottom:350]
sprite2Location = [#left:400, #top:550, #right:500, #bottom:750]

To create an empty property list:

Set the list to [:].