Editing Lists of LISTS
Editing Lists of LISTS
- Subject: Editing Lists of LISTS
- From: "Justin Laden" <email@hidden>
- Date: Fri, 18 Jan 2008 15:33:43 -0500
I'm trying to loop through a list of lists and I'm having trouble
accessing the inner lists---I get this error:
Can't make {{"purple"}, {"blue"}, {"black"}} into type integer.
Here's my code--I'm just using short lists for testing purposes:
set testList to {{"1"}, {"2"}, {"3"}}
set twoList to {{"purple"}, {"blue"}, {"black"}}
repeat with i from 1 to (twoList)
repeat with j from 1 to (twoList)
set item j of list i of twoList to "green"
end repeat
end repeat
Yet, when I DON"T loop through I can access the lists:
set item 1 of list 1 of twoList to "green"
This works--why?
Also, when I try:
repeat with i from 1 to (twoList)
set item i of list i of twoList to "green"
end repeat
It doesn't work.
Thanks everyone!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden