[Xerte] Making a page counter in Xerte 1.8

Paul Swanson Paul.Swanson at harlandfs.com
Mon Oct 29 20:47:50 GMT 2007


I've been working on creating a page counter within a Framework, and
when you get to the first page of the framework, the total number of
pages isn't calculating correctly.

I have an empty text icon with an ID of 'slideCounter' that is in the
Entry Frame of the framework. The framework ID is dbInst. I am placing
the following code in a script icon on each page (not in the Entry
Frame):

slideCounter.setText('Slide ' + (dbInst.currentPage + 1) + ' of ' +
dbInst.pages.length);

On the first page of the framework, this prints 'Slide 1 of 1'. Moving
to the second page, it correctly prints 'Slide 2 of 20' and returning to
the previous page, it prints 'Slide 1 of 20' -- so it isn't giving the
correct value for the length of the pages array on the first pass, but
correctly does so after that. And if that wasn't strange enough, if I
use Ctrl+F5 to open Page 1, it displays the correct values, but if I
navigate to this framework from the page prior to it (or use Ctrl+F5
with the Framework icon selected), it displays the incorrect value.

Is there a better way to do this?

_____________________________

 Paul Swanson
 Harland Financial Solutions
_____________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20071029/3c67b6ae/attachment.html


More information about the Xerte mailing list