🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18077

Re: Simple AS "How come"

#18077
From: Dave Saunders
Date: Mon, 28 Apr 2003 16:35
17 lines
1510 bytes
Ah, this came up just recently and Shane explained it. The problem is something like this:

myFrames is a list of references to your frames.

So, when you say repeat with i in myframes what i contains is something like item n of myframes. Thus, the contents of i is a reference to your frame and not the contents of your frame.

In situations like this, use a counter:

repeat with i from 1 to count of myframes
return contents of item i of myframe
end

In this way of doing things, our return statement (in this case) is the reference to the frame and so you get the contents of the frame, rather than the contents of the pointer to the frame (as in the other construction).

Does that make sense? If not, try a search on Shane's name in this forum. He explained it within the last month or so.

Dave
Technical Details
Message-ID: <1de8e7d1.3@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8e7d1.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,b7270121fe8e3424
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-04-28 10:08:54 PST
From: "Dave Saunders" <daves@pdsassoc.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Simple AS "How come"
Message-ID: <1de8e7d1.3@WebX.la2eafNXanI>
Date: Mon, 28 Apr 2003 09:35:09 -0700
References: <1de8e7d1.-1@WebX.la2eafNXanI>
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit