Article View: adobe.scripting.indesign
Article #9484Re: [JS] selecting text frame by script label
From: Dave_Saunders
Date: Mon, 21 Aug 2006 20:54
Date: Mon, 21 Aug 2006 20:54
7 lines
1470 bytes
1470 bytes
In this case, that is, when you use .item() with a name, it is behaving in the same way as .itemByName(). In either case, if the collection in question is of objects that have a name, then you will get the first object found with that name (and only the first object), but if the objects have no name but do have a label, then you'll get the collection of such objects that share that label. [The difference is the result of the label feature being added later and the name behavior already being ingrained -- I'm inclined to think that the name behavior warrants changing, although it doesn't come up very often that named objects can have the same names -- off the top of my head, the only possibilities are: documents, libraries, book, and assets in libraries.] In those cases where an object my have both a name and a label, the name behavior wins. Dave
Technical Details
Message-ID:
<3bc1574b.2@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc1574b.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,eb01d6c7b25d7bcd X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: [JS] selecting text frame by script label Message-ID: <3bc1574b.2@webcrossing.la2eafNXanI> Date: Mon, 21 Aug 2006 13:54:47 -0700 References: <3bc1574b.-1@webcrossing.la2eafNXanI> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing