2 Replies Latest reply on Jul 13, 2006 4:28 PM by Applied CD

    Getting list of props from a prop list?

    Applied CD Level 1
      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