Hi NT
<code starts here>
 global aList
property p_Str_ShapeName

 on mouseUp me
   spotCheck = getOne(aList, 0)
   if spotCheck <> 0 then
     setAt(aList, spotCheck, new(script "aScript", spotCheck + 5,
p_Str_ShapeName))
   end if
 end

on getPropertyDescriptionList
return\
[\
#p_Str_ShapeName :[#Comment: "Select the shape name: ", #Format:#String,
#Default: "circle shape", range: [ "circle shape", "square shape", "triangle
shape", "random choice"]]\
]
end getPropertyDescriptionList
<code ends here>

the getPropertyDescriptionList is a handler that runs when you drop the
behaviour onto a sprite. it produces a dialogue box that will enable to
select the type of "shape" that you desire. It prepopulates the property
p_Str_ShapeName which is defined as a string. So in the
getPropertyDescriptionList, you see the property name preceded by a symbol
"#" because of the method I used to generate the return list. Each component
of the list entry is required:
#Comment is the message that you will see as the label to the dropdown list
that will be generated.
#Format tells director what kind of information will be contained in the
dropdown list
#Default tells it what string (in this case) will appear in the field when
the dialogue opens for the first time
#Range tells director that you are specifying a list of values (dropdown
list) that contains the values to be selected.

Had you omitted the range, then it would have placed the text defined by
#Default into an editable field and you would have to retype your string to
change it, by specifying the range you give the end developer a list to
quickly set the value from.

As with anything in Lingo, there are more ways to skin the cat then just one
method. The getPropertyDescriptionList is no exception. Basically you need
to generate a property list and return it to the calling function (which in
this case is the internals of director) So however you desire to create and
return the list as long as it is a valid method would suffice.

Hope this helps.

Sincerely
Mark R. Jonkman


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to