Subject: | |
From: | |
Reply To: | |
Date: | Thu, 21 May 2009 09:39:41 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
>
>You can not concatenate lists and record because you might get a
>list or a record (1 case that I can think of) and this is not what
>one wants in general.
>My first example indicated in how to concatenate a list with a list
>of 1 record.
>Concatenating lists and records is problematic. End of story.
Having just had a problem, I'd have to accept the adjective "problematic."
Lots of good info in this thread; I'm glad I brought it up.
And I found another detail I should pass along for anyone else trying
to deal with this stuff.
set recordList to {}
set oneRecord to {foo:1, bar:"hello"}
set end of recordList to oneRecord
set twoRecord to {foo:2, bar:"Goodbye"}
set end of recordList to twoRecord
recordList
--->{{foo:1, bar:"hello"}, {foo:2, bar:"Goodbye"}}
Now
repeat with aRecord in recordList
if foo of aRecord is 1
set stuffIneeded to aRecord
end if
end repeat
--> returns the entire list.
It has to be
set stuffIneeded to CONTENTS of aRecord
Fairly easy to figure out (I managed), but not the way ordinary lists behave.
--
Bill Steele
[log in to unmask]
The ultimate confrontation:
"You will be assimilated."
"Exterminate! Exterminate!"
|
|
|