[Xerte] displaying variable info in text icon
Dave Burnett
d_b_burnett at hotmail.com
Thu Mar 4 10:45:31 GMT 2010
Alternatively, you can hang all the paging code off the nav buttons,
set up a blank text field somewhere and use setText to update it:
e.g. code under Next button:
page = i_main_frame.currentPage+2;
// i_main_frame= framework pages are attached to, +2 because 0 based
page_count_display.setText('<pgcounter_text>Page ' + page + ' of ' + page_count + '</pgcounter_text>');
//page_count_display is empty text icon with text field positioned correctly
prev_page_rs._visible = 1;
//turn on the Previous page button (it starts out hidden)
if (page == page_count) {
next_page_rs._visible = 0;
}
//turn off the Next button at end of pages
i_main_frame.gotoPage((i_main_frame.currentPage+1));
//navigate
You can ignore <pgcounter_text>, it's a css style tag.
> From:
> xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of ron at kccsoft.com
>
> Sent: Thursday, March 04, 2010 5:07 AM
>
> To: 'Xerte discussion list'
>
> Subject: [Xerte] displaying variable info in text icon
>
> From Paul’s posting today:
> {'Page ' + (frameworkID.currentPage
> + 1) + ' of ' + (frameworkID.pageCount)}
> This should display these variables
> if pasted into a text icon, correct?
> It doesn’t for me. I’ve spent many
> hours trying get {} to display variable information, I’m wondering if there is
> some special setting somewhere in xerte that controls this. Occasionally (maybe
> 1% of the time, in a new file) I can get a display, but it’s extremely
> unreliable. I’m sure it shouldn’t be this difficult.
>
> I’m trying to build a FW navigation
> structure but its very hard to do without being able to see variable
> information:
>
>
>
>
>
>
>
> If FWICON.currentPage <
> FWICON.pages.length then
>
>
>
> Go to next
>
>
>
> Else
>
>
>
> Go to Main Menu
>
>
>
>
>
>
>
>
>
>
>
> What am I doing wrong?
>
>
>
>
>
>
>
> TIA RonM2
>
>
>
>
>
>
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/
More information about the Xerte
mailing list