[Xerte] Making a page counter in Xerte 1.8 - Solved

Paul Swanson Paul.Swanson at harlandfs.com
Mon Oct 29 21:20:53 GMT 2007


Correction: it is a Time Limit interaction, not Tries Limit. (But you
probably already guessed that...)


________________________________

	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
	Sent: Monday, October 29, 2007 2:10 PM
	To: Xerte discussion list
	Subject: RE: [Xerte] Making a page counter in Xerte 1.8 - Solved
	
	
	It seems to be a timing issue. I added a 0.1 second Tries Limit
interaction before the script that prints the counter on the first page,
and it correctly prints the number of pages in the framework.
	 
	- Paul


________________________________

		From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
		Sent: Monday, October 29, 2007 1:48 PM
		To: xerte at lists.nottingham.ac.uk
		Subject: [Xerte] Making a page counter in Xerte 1.8
		
		

		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/ee0ffd38/attachment.html


More information about the Xerte mailing list