[Xerte] Using getPageIndex() to fill an array

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Jun 25 13:17:13 BST 2009


It won't conflict as only one of those frameworks is active at anyone
time. It might have been better named as 'currentFramework'

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Fred Riley
Sent: Thursday, June 25, 2009 1:14 PM
To: Xerte discussion list
Subject: RE: [Xerte] Using getPageIndex() to fill an array

> Instead of using rootIcon.getPageIndex(), you need to use 
> iconID.getPageIndex(), where iconID is the id of the 
> framework you are interested in. If you are in the top level 
> page, but then drop into a nested framework, then 
> rootIcon.getPageIndex() will always return the same number ( 
> as you haven't changed page on the interface icon, i.e. 
> rootIcon ) as you navigate through the nested framework.
>  
> Does that help?

Yes, thanks Julian. The framework ID is 'fw' so using:

pagenum = fw.getPageIndex();

returns a different value for each page, so I can use code such as:

texts[pagenum] = icon.parentNode.clip().text;

to store user text from different pages in an array. There are four
frameworks in the application, all with the id "fw". Is this likely to
lead to conflict if I refer to fw in code in pages in each of these
frameworks, or are they all self-contained? Clear as mud that, I think.
I'll play around and see what happens. I can't rename the IDs as they're
referenced in other code buried away in interactions.

Cheers

Fred
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte


More information about the Xerte mailing list