User Guide
on getPropertyDescriptionList 175
Description
System message and event handler; contains Lingo that generates a list of definitions and labels
for the parameters that appear in a behavior’s Parameters dialog box.
Place the
on getPropertyDescriptionList handler within a behavior script. Behaviors that
don’t contain an
on getPropertyDescriptionList handler don’t appear in the Parameters
dialog box and can’t be edited from the Director interface.
The
on getPropertyDescriptionList message is sent when any action that causes the
Behavior Inspector to open occurs: either when the user drags a behavior to the Score or the user
double-clicks a behavior in the Behavior inspector.
The
#default, #format, and #comment settings are mandatory for each parameter. The
following are possible values for these settings:
Example
The following handler defines a behavior’s parameters that appear in the Parameters dialog box.
Each statement that begins with
addProp adds a parameter to the list named description. Each
element added to the list defines a property and the property’s
#default, #format, and
#comment values:
on getPropertyDescriptionList
description = [:]
description.addProp(#dynamic, [#default:1, #format:#boolean, \
#comment:"Dynamic"])
description.addProp(#fieldNum, [#default:1, #format:#integer, \
#comment:"Scroll which sprite:"])
description.addProp(#extentSprite, [#default:1,#format:#integer, \
#comment: "Extend Sprite:"])
description.addProp(#proportional, [#default:1,#format:#boolean, \
#comment: "Proportional:"])
return description
end
See also
addProp, on getBehaviorDescription, on runPropertyDialog
#default
The parameter’s initial setting.
#format #integer #float #string #symbol #member #bitmap #filmloop #field #palette
#picture #sound #button #shape #movie #digitalvideo #script #richtext
#ole #transition #xtra #frame #marker #ink #boolean
#comment
A descriptive string that appears to the left of the parameter’s editable field in the
Parameters dialog box.
#range A range of possible values that can be assigned to a property. The range is
specified as a linear list with several values or as a minimum and maximum in the
form of a property list:
[#min: minValue, #max: maxValue].