🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
4 messages
4 total messages Started by buhari_masthan Mon, 05 Jan 2009 12:16
Error in anchored text frame (CS2)
#2136
Author: buhari_masthan
Date: Mon, 05 Jan 2009 12:16
21 lines
1310 bytes
Hi All,

I got an error when I run a script which creates anchored text frame with the following code:

var myLeading = 15.5;
  var myFrameWidth = 192;
  var myY1 = myAnchoredFrame.geometricBounds[0];
  var myX1 = myAnchoredFrame.geometricBounds[1];
  var myY2 = myY1 + myLeading;
  var myX2 = myX1 + myFrameWidth;
  myAnchoredFrame.geometricBounds = [myY1, myX1, myY2, myX2];

The above mentioned code works good in CS3. But shows error in CS2 as follows:

Error string: This value would cause one or more objects to leave the pasteboard
Source: myAnchoredFrame.geometricBounds = [myY1, myX1, myY2, myX2];

Can anyone help me to rectify the error?

Regards,
Masthan
Re: Error in anchored text frame (CS2)
#2137
Author: Dave_Saunders
Date: Mon, 05 Jan 2009 13:35
3 lines
774 bytes
In CS2, before running this part of the script, be sure to recompose the parent story. CS3, generally speaking, auto-recomposes for you. That's why it works in CS3.

Dave
Re: Error in anchored text frame (CS2)
#2244
Author: buhari_masthan
Date: Wed, 07 Jan 2009 09:23
9 lines
882 bytes
Hi Dave,

Thanks for your reply.

I have insert the recompose code as per your suggestion, but the problem persists.

The script works fine for the frames at first spread pages and while continuing it shows error at the next spreads. I couldn't catch the bug. Could you help me?

Masthan
Re: Error in anchored text frame (CS2)
#2049
Author: Dave_Saunders
Date: Wed, 07 Jan 2009 13:26
3 lines
897 bytes
When something like this happens to me, step through the offending piece of code using ESTK and watch the values in the Data Browser. Have you tried that to see what values you're working with. Half the battle is knowing exactly when the wrong value appeared. Then you have to delve into why it happened.

Dave
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads