1 Reply Latest reply on May 25, 2007 2:50 PM by Newsgroup_User

    Search through property list

      I have a property list of all the text members in one of my casts where the names and the contents of the text members are stored in a property list as symbol/string name/value pairs.

      Is there a way of looping through all the characters in the string values and store all occurances of the search term along with the name of the symbol they belong to. Then repeat this process for all the values in the list?

      Many thanks
        • 1. Re: Search through property list
          Level 7
          on mFindMatchingProps pList, sMatch
          lFound = []
          if ilk(pList, #propList) then
          if stringP(sMatch) then
          nProps = count(pList)
          repeat with p = 1 to nProps
          tValue = pList[p]
          if stringP(tValue) then
          if offset(sMatch, tValue) then lFound.append(pList.getPropAt[p])
          end if
          end repeat
          end if
          end if
          return lFound