Hi Kerry, 

The problem is that
  > addProp(gWordList, #listStart, [:]
  > addProp(gWordList, #aWord, masterList.line[i].item[j]
are both adding to the 'top' list, not creating an array.

Try this

the itemDelimiter = ";"
repeat for i = 1 to numLines
    theText = masterText.line[i].item[1] --I know this works
    if theText = "Start" then
       subList = [:]
       repeat with j = 2 to masterList.line[i].item.count
         subList.addProp( #aWord, masterList.line[i].item[j])
       end repeat
       gWordList.addProp( #listStart, subList )
    end if
end repeat



on 6/9/00 10:27 AM, Kerry Thompson at [EMAIL PROTECTED] wrote:

> This should be simple, but I'm getting tangled up in the dot syntax--and
> maybe in multidimensional arrays, too. It's been a long week this month.
> 
> I want to display a list of words, chosen from several lists. Ideally, I'd
> like to do something like:
> 
> wordList = masterList[n]
> repeat with i = 1 to wordList.count
> put wordList.aWord[i]
> end repeat
> 
> The line I am looking to convert to a list looks like this:
> "Start;Lingo;C;Pascal"
> 
> Currently I have this code to create the list:
> the itemDelimiter = ";"
> repeat for i = 1 to numLines
> theText = masterText.line[i].item[1] --I know this works
> if theText = "Start" then
> addProp(gWordList, #listStart, [:]
> repeat with j = 2 to masterList.line[i].item.count
> addProp(gWordList, #aWord, masterList.line[i].item[j]
> end repeat
> end if
> end repeat
> 
> I know I'm not building the list right--I think I want a list something
> like this:
> 
> [#listStart: [#aWord: "Lingo", #aWord: "C", #aWord: "Pascal"], #listStart
> [#aWord: "Apple", #aWord, "Dell", #aWord, "Gateway"]]
> 
> I've been working on this too long, and I'm all turned around. Where
> (probably multiple places) am I going wrong?
> 
> 
> Cordially,
> Kerry Thompson
> Learning Network
> 
> 
> [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!]

-- 

Luke Wigley
Multimedia Director/Producer
Mecca Medialight Pty Ltd

Mecca Medialight:                       Medialight Sound Studio:
111 Moor Street                         1 Bakehouse Lane
Fitzroy, Vic. 3065                      North Fitzroy, Vic. 3068
Tel +613 9416 2033                      Tel +613 9416 2033
Fax +613 9416 2055                      Fax +613 9416 2055

www.medialight.com.au
__________________________________________________________________________



[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