🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #3

Re: Using for ... in with arrays

#3
From: Dave_Saunders
Date: Tue, 31 Mar 2009 17:49
15 lines
902 bytes
Because collections are objects, they do support for/in loops, but the results aren't very useful:

myDocs = app.documents; 
for (j in myDocs) { 
   $.writeln(j); 
}

produces:

length 
Execution finished.

Which indicates that a collection has just one (visible) property named length.

Dave
Technical Details
Message-ID: <59b87616.11@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b87616.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,709551d954315a95
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Using for ... in with arrays
Message-ID: <59b87616.11@webcrossing.la2eafNXanI>
Date: Tue, 31 Mar 2009 10:49:49 -0700
References: <59b87616.-1@webcrossing.la2eafNXanI>
Lines: 9
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit