Article View: adobe.scripting.indesign
Article #463Re: Array sort with XML Attributes
From: Dave_Saunders
Date: Sat, 21 Mar 2009 13:09
Date: Sat, 21 Mar 2009 13:09
7 lines
915 bytes
915 bytes
Use a callback function with the standard JavaScript sort call. The function would be responsible for comparing the values of the pg attributes and returning -1, 0 or 1 to the sort function. The general idea is described here (first hit on a Google search): <http://solutoire.com/2007/05/02/sorting-javascript-arrays/> Dave
Technical Details
Message-ID:
<59b85dd0.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b85dd0.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,1a40e30e5d3787a9 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!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Array sort with XML Attributes Message-ID: <59b85dd0.0@webcrossing.la2eafNXanI> Date: Sat, 21 Mar 2009 06:09:52 -0700 References: <59b85dd0.-1@webcrossing.la2eafNXanI> Lines: 9 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit