#44284 - 07/18/13 06:50 AM
Re: Overflow Iteration Condition
[Re: ]
|
Oliver
Unregistered
|
execpage() line before showpage() results into run error 'Loop too long'
Is there any other way to show the overlay page on all pages including with showpage()?
|
Top
|
|
|
|
#44285 - 07/18/13 07:23 AM
Re: Overflow Iteration Condition
[Re: ]
|
OL Guru
Registered: 07/03/12
Posts: 106
|
use:- @overlayPageName unless you need the overlay page to be variable.
well, both methods work for me but you must be doing something wrong if you run into loop too long.
make sure that there are two pages set up, one to handle your output and another to handle the overlay.
the overlay page is set as such by means of 'page properties' -> 'basic attributes'
do NOT add this page to the overlays section of your output page!
within the code of your output page, whenever you use @overlayPageName, this overlay will be executed so you need to add it right at the top of your script for page 1, and then again within the loop right AFTER the showpage() function.
if you are using showpage() outside of your loop to produce a last page, then @overlayPageName will have to be added following that as well..
|
Top
|
|
|
|
#44343 - 07/22/13 07:31 AM
Re: Overflow Iteration Condition
[Re: ppuserd]
|
Oliver
Unregistered
|
I have this code but it still shows run error 'Loop too long' define(&overflowLine,integer,0) define(&_x,measure,0.0) define(&_y,measure,0.0)
&_x:=&physical.x &_y:=&physical.y @overlay for(¤t.line,5,1,&LastLineNo) if(&overflowLine=20) showpage() @overlay moveto(&_x,&_y) margin(&_x,&_y) set(&overflowLine,0) endif()
show(@(¤t.line,1,2)) crlf(0.1667) &overflowLine:=&overflowLine + 1 endfor()
|
Top
|
|
|
|
#44344 - 07/22/13 07:50 AM
Re: Overflow Iteration Condition
[Re: ]
|
OL Guru
Registered: 07/03/12
Posts: 106
|
are you positive that you don't have the page'overlay' set as an overlay to your output page?
if so then deselect it as we are covering that with the @overlay instruction.
the only place an overlay option needs to be set in the gui is on the overlay page itself, where the basic attributes must show 'page type' -> 'overlay'
where do you define &LastLineNo and what is it set to?
Edited by ppuserd (07/22/13 07:52 AM)
|
Top
|
|
|
|
#44345 - 07/22/13 07:54 AM
Re: Overflow Iteration Condition
[Re: ]
|
OL Guru
Registered: 07/03/12
Posts: 106
|
ah! for each showpage() then reset your &overflowLine to zero..
|
Top
|
|
|
|
#44381 - 07/23/13 02:14 AM
Re: Overflow Iteration Condition
[Re: ]
|
Oliver
Unregistered
|
Yes, I have set my "Normal" Page without Overlay/Underlay and I have an Overlay Page which is @overlay.
And yes I have set my overflow line to 0 after showpage()
set(&overflowLine,0)
|
Top
|
|
|
|
#44382 - 07/23/13 05:07 AM
Re: Overflow Iteration Condition
[Re: ]
|
OL Guru
Registered: 07/03/12
Posts: 106
|
so you do. i have just manually defined &lastLineNo and can reproduce that.
turns out that you are making use of a system variable called ¤t.line, however this is only appropriate when you are making use of a repeating object.
within a for loop though, you can make use of something very similar. see below:-
|
Top
|
|
|
|
#44383 - 07/23/13 05:11 AM
Re: Overflow Iteration Condition
[Re: ppuserd]
|
OL Guru
Registered: 07/03/12
Posts: 106
|
define(&overFlow,integer,2) define(&LastLineNo,integer,5)
define(&counter,integer,0) define(&i,integer,0)
execpage('overlay')
for(&i,1,1,&LastLineNo)
&counter := &counter + 1
show(@(&i,1,5)) crlf(0.1667)
if(&counter = &overFlow) showpage() execpage('overlay') &counter := 0 endif()
endfor()
|
Top
|
|
|
|
|
|