At 21:14 3/27/2001, Kerry Thompson wrote:
>I should know how to do this, I know... I think I'm having a Senior Moment.
>
>I have a property list with multiple items having the same property. 
>Something like [#roster: [#name: "Tab"], [#name: "Jakob"], [#name: 
>"Roy"]]. It's actually a considerably more complex list, but that's the 
>idea--multiple items with the #name property.

If #roster is supposed to be a list of lists, I think you need another set 
of brackets:

[#roster: [[#name: "tab"], [#name: "jakob"], [#name: "roy"]]]

Then this can work:

repeat with i = 1 to theList.roster.count
   put theList.roster[i].name
end

It's past my bedtime, too, so maybe this is normal, but here's what I 
experienced with the list as you posted it:

-- Welcome to Director --
foo = [#roster: [#name: "tab"], [#name: "jakob"], [#name: "roy"]]
put foo.count
-- 3
put foo.roster
-- [#name: "tab"]
put foo.roster[1]
-- "tab"
put foo.roster.getPropAt(1)
-- #name
put foo[1].name
-- "tab"
put foo[2].name
-- "jakob"
put foo.getPropAt(1)
-- #roster
put foo.getPropAt(2)
-- 2
put foo.getPropAt(3)
-- 3

So it seems as though the first item has a property of #roster while the 
other 2 items are linear?
Lost me at the bakery.


--
Mark A. Boyd
Keep-On-Learnin' :)


[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