🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17934

Making a list of records

#17934
From: John Darnell
Date: Thu, 08 May 2003 18:57
17 lines
1572 bytes
Hello Fellow Scripters:

I want to make a list of records. My code (which doesn't work at this point) looks something like this:

set mylist to {}

set newrec to {name: "A", field1:"B", field2:"C"}

set mylist to mylist & newrec
set newrec to {name: "D", field1:"E", field2:"F"}

set mylist to mylist & newrec
etc.

According to the Applescript PDF, what the operator does to the expression on the right depends upon what is on the left. If it is a list, then it adds the expression on the right as an item. If it is a record, then it adds new fields from the right to the left without changing values in fields on the left.

All my code seems to do is add the first record to the list and then stop, which leads me to believe that it does not see mylist as a list on the first round. What am I doing wrong?
Technical Details
Message-ID: <1de90d35.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3845e11710b1b81a,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-08 12:08:25 PST
From: "John Darnell" <John.Darnell@Walsworth.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Making a list of records
Message-ID: <1de90d35.-1@WebX.la2eafNXanI>
Date: Thu, 8 May 2003 11:57:24 -0700
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit