You're almost there...
repeat with aa = 1 to count(propertyListName) set TheName to getPropAt(propertyListName, aa) set TheValue to ???
set the value to getAt(propertyListName, aa)
getPropAt gets you the prop at the location getAt gets you the value at the location.
Optimization hint - get the count outside the loop, as in:
numItems =count(propertyListName) repeat with aa = 1 to numItems theName =getPropAt(propertyListName, aa) theValue =getAt(propertyListName, aa) end repeat
Otherwise you're calling the count function for every time through the list, even though the list doesn't change.
Probably not as critical now in these days of overclocked 1 ghz processors, but still, a good optimization habit.
- Tab
At 09:20 PM 6/8/03, Teo Petralia wrote:
Hello!
I can't figure out how to access a property list value using list number instead of using property name. For instance if I want to go through all the items of a property list and get all the values using a repeat loop what I need to do?
Like: repeat with aa = 1 to count(propertyListName) set TheName to getPropAt(propertyListName, aa) set TheValue to ???
end repeat
thanks for any suggestions
Teo
[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!]