🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9032

Object is invalid, and I'm not sure why

#9032
From: thechrisproject
Date: Wed, 13 Sep 2006 15:13
33 lines
1434 bytes
I have some code that gets the last page in a document and then will move all its elements to another page. Right now, I have this code, and I'm testing it in the ExtendScript Toolkit against InDesign Server: 

      var activePage = workingDoc.pages[workingDoc.pages.length];





      $.writeln("active page " + activePage);





      $.writeln("active page items " + activePage.pageItems);




The output is this: 

      active page [object Page]





      Object is invalid




I don't understand why page.pageItems would be invalid. When I use the reflection object to list all the properties, pageItems is certainly one of them. Is my page somehow an invalid page?
Technical Details
Message-ID: <3bc199cc.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.germany.com!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,3a68c910e3df7844,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: thechrisproject@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.germany.com!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Object is invalid, and I'm not sure why
Message-ID: <3bc199cc.-1@webcrossing.la2eafNXanI>
Date: Wed, 13 Sep 2006 08:13:40 -0700
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit