🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14563

Re: [JS] textFrames.item(<string>) working flaky ?

#14563
From: Mark_Volmer
Date: Thu, 22 Jan 2004 14:36
25 lines
1701 bytes
I was indeed in search of the override method ;-)
Still, I'm not able to use a string as an argument to textFrames.item() either in a masterPageItem nor in a normal PageItem.

I'd like to be able to this:

		 
overriddenFrame = newPage.appliedMaster.textFrames.item("frmCardN").override(newPage); 
overriddenFrame.contents = iNumOfSpeeches.toString(); 


But instead I'm forced to do this:

 
for(i=0;i<newPage.appliedMaster.textFrames.length;i++) 
  { 
    if(newPage.appliedMaster.textFrames.item(i).label.toString().substring(0,8) == "frmCardN") 
      { 
        overriddenFrame = newPage.appliedMaster.textFrames.item(i).override(newPage); 
        overriddenFrame.contents = iNumOfSpeeches.toString(); 
      } 
  } 


Note the terrible label.toString().substring(0,8) construction, without which the if statements fail.
I have a feeling the problem lies in the label having leading or trailing extra characters...
Technical Details
Message-ID: <2ccf8233.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf8233.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,add8ced36166d204
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-22 06:37:42 PST
From: Mark_Volmer@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: [JS] textFrames.item(<string>) working flaky ?
Message-ID: <2ccf8233.1@webx.la2eafNXanI>
Date: Thu, 22 Jan 2004 06:36:52 -0800
References: <2ccf8233.-1@webx.la2eafNXanI>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit