> example may have been lame, but the point was that working
> backward from
> value was no guarantee that you got the matching property.

Hmm.. I see your point now. Actually, that would also be true for a properly
structured list, such as:
[#name: "Joe", #password: "Joe", #age: 3]

It's still not a problem for Kerry's example (he only has one property per
sub-list, so it can't conflict with anything else), but for any list that
has more then one property in it, my approach is potentially buggy.

on propLst, myProp
  mainList = [ [#puzzle: [ [#title: "One"], [#level: "Moderate"], [#word:
"Lingo"], [#word: "Director"] ] ],  [#puzzle: [ [#title: "Two"], [level:
"Beginner"], [#word: "Action"], [#word: "Flash"] ] ] ]

  repeat with subList1 in mainList
    repeat with subList2 in subList1
      repeat with subList3 in subList2
        iMax = sublist3.count
        repeat with i = 1 to iMax
          if subList3.getPropAt(i) = myProp then
             put sublist3[i]
          end if
        end repeat
      end repeat
    end repeat
  end repeat
end





[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