From: Applied CD on
I need to loop through the properties in a property list. The prop list is
built dynamically so I don?t know what?s in the list before I start. Is there a
direct way of getting a list of properties out of a property list? I suppose I
could build a linear list of property names at the same time I?m building the
actual property list but I would like to do this with just one list if
possible. The following example won?t work, but it gives you an idea of what
I?d like to do:

myTransportList = [#walk : ?free?, #car : ?expensive?, #plane : ?very
expensive?]

repeat with myTransportType in myTransportList
myCost = myTransportList[symbol(myTransportType)]
end repeat


Thanks,

- Bob Gallo

From: Dave C on
How about a simple function that takes a propertyList as a parameter and
returns a list of the proerties found in the list? That way you don't have
to maintain a seperate list. You can just call your function when needed?

on getListProps thePropList
returnList = []
repeat with i = 1 to thePropList.count
returnList.add(thePropList.getPropAt(i))
end repeat
return returnList
end


From: Applied CD on
Yeah, thanks ... that would work well. Much better than moving another global list around.