Lingo Dictionary > G-K > on getPropertyDescriptionList |
![]() ![]() ![]() |
on getPropertyDescriptionList
Syntax
on getPropertyDescriptionList
statement(s)
end
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 Director's 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:
#default |
The parameter's initial setting. |
#format |
|
#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: |
Example
This 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 = [:]
addProp description,#dynamic, [#default:1, #format:#boolean, #comment:"Dynamic"]
addProp description,#fieldNum, [#default:1, #format:#integer, \ #comment:"Scroll which sprite:"]
addProp description, #extentSprite,[#default:1,#format:#integer, \ #comment: "Extend Sprite:"]
addProp description,#proportional,[#default:1,#format:#boolean, \ #comment: "Proportional:"]
return description
end
See also
addProp
, on getBehaviorDescription
, on runPropertyDialog
![]() ![]() ![]() |