> Kerry,
>
> Couple of followup questions:
>
> I have three different things I want to set here: a list, a
> string and a string. Are you saying that after setting the
> first item: pListOfSubMenusToCheck, which has a default
> format of #list and adding all those properties to the
> propList, that I can't reset theDefault to a #string and add
> that to the propList? Why not?
I suspect you're used to working in a language that has typed variables.
Lingo's variables are untyped. That is, they will accept anything you
give them--a string, an integer, a property, a real, a linear list, a
property list, a pointer, or any type of value. You can change type in
midstream. For example:
x = 10 -- x is an integer
x = "10" -- x is now a string
x = [10] -- x is now a linear list with one integer element
x = ["10"] -- x is now a linear list with one string element
x = "[10]" -- x is now a string
x = #ten -- x is now a symbol represented in your source code by #ten
Setting theDefault to #string makes theDefault a symbol which you can
access with #string. It doesn't make theDefault a string. It makes it a
symbol.
> In short, if I want to add a custom list as a property to a
> behavior, along with other items, what is the best way to do that?
Set it explicitly to a list. For example:
x = [10, 20] -- x is a list
x = value("[10, 20]") -- x is a list
The following will not create a list
x= "[10, 20]" -- x is a string
x= value ("10") -- x is an integer with a value of 10
I think the main thing to remember is that Lingo variables aren't typed
at all, except by what you assign to them. Also, #string is a symbol,
and doesn't really have anything to do with a string variable.
Cordially,
Kerry Thompson
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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!]