Kerry Thompson wrote:

>
> I see--you're replacing the text each time through the loop, rather than
> adding to it. Assuming "display" is a text member, try this:
>
> repeat with 1 to mainlist.sub1.teams.count
>     team=getaprop(mainlist.sub1.teams, mainlist.sub1.teams.getpropAt(i))
>     put team after member("display")
> end repeat
>

You also might want to try adding all your text to a variable and then
setting the text of the member from that variable.
Last time I checked this approach was much faster than writing to the member
on each loop.

--untested lingo follows

on list_teamnames
   theCounter=mainlist.sub1.teams.count
   theNames=getaprop(mainlist.sub1.teams, mainlist.sub1.teams.getpropAt(1))
   repeat with 2 to theCounter
      team=getaprop(mainlist.sub1.teams, mainlist.sub1.teams.getpropAt(i))
      theNames=theNames&return&team
   end repeat
   member("display").text=theNames
end

Rob




[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