[Xerte-dev] Re: navigating to page name

Kemp Johnathan johnathan.kemp at ntlworld.com
Mon Feb 27 11:50:01 GMT 2012


  "You can read the engine code and play around if you want."

Anything like that will probably have to wait until I can get my part of
the 2.18 release finished.

There wouldn't be a method I can call from a script that would select
either of the "large" or "larger" settings as the setting for a project
would there? I could then give the author a choice of default, large, or
larger.

If there is not anything obvious that you can think of that I can use, then
I'll put the stage size investigation on a back burner until I can get to
the other side of the xerte 2.18 release.

I will still include the display wizard in the default rlo for "page
projects".

Kind regards

Johnathan



On 27 February 2012 11:17, Julian Tenney <Julian.Tenney at nottingham.ac.uk>wrote:

> It gets funky because of the smoke and mirrors needed to scale the hosting
> div. So the values for default, large and larger (or whatever they are) are
> fixed at 120% and 144% of the default 800x600. You can read the engine code
> and play around if you want.
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 27 February 2012 11:15
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> At present you can set the stage size as a property of the learning object
> icon. However I have not been able to find a way of setting the stage size
> in a script based on values entered into an xwd form..
>
>
>
> What I am thinking of here is that currently Xerte and XOT default to a
> standard stage size. At present most, if not all, the models are designed
> to that stage size, though it would be possible to design models that
> worked out their dimensions as a proportion of the stage size and where
> thus scalable (the scenario page works this way).
>
>
>
> A while ago we had someone posting about how to change the layout of the
> Xerte display, with buttons at the bottom being described as a "Holy Grail
> of Xerte". The trouble with doing this is to make it work you have to
> increase the width of the status bar. If you retain the height of the title
> bar so that you can display page titles then your display area is reduced
> in height, this could be resolved by an ability to also set a higher
> default stage height.
>
>
>
> I have personally found that with some projects I haver been working on
> would have benefited from a larger default screen size, e.g. when using
> media from a screen capture program to demonstrate an application.
>
>
>
> I have at present a working xwd and script that will change most of the
> xerte display, that can be used in desktop xerte to enable the developer to
> adjust most of the colours, all of the bar heights, the bar opacities,
> background and logo image, button position (top or bottom) display / hide
> individual buttons and menus.
>
>
>
> I have not implemented anything to do with fonts. But the main features it
> cannot implement at present are a setting of a new default stage size for
> the project and a repositioning of the project and page titles. Some of the
> features such as the re-positioning of the buttons is only really usable if
> you can make adjustments to the stage size.
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 27 February 2012 07:41, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> Change stage size to what? It’s already handled in the rlt, to allow
> fillScreen / fillWindow options.
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 25 February 2012 21:42
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> Magic!
>
>
>
> You wouldn't happen to have anything up your sleeve which will allow me to
> change the stage size from script based on user selected values in an xwd
> form now would you?
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 21 February 2012 13:29, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> Do you have a preference regarding the use of style sheets? There are
> currently a few colour properties that can only be set by a style sheet. So
> in practice everything else could be set from the form, or would you rather
> keep all colours in the style sheet?
>
>
>
> You can set all the styles through code (STYLES.styleName = value), you
> then have to refresh the apge. See the code in engine loadstylesheet
> function
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 20 February 2012 16:53
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> Re the back button, I would have thought that swapping the current back
> button to use goBack() instead of prevPage() would work.
>
>
>
> I’d like to nail down a target date for some new builds: maybe 6 weeks
> time?
>
>
>
> I have just about finished work on preparing the xwds and rlms though
> there are still a few loose ends. The big one is that at present we still
> cannot take the name property from the xml and assign it to the title
> property of the page icon. You mentioned in a different thread the
> possibility of having an event to ensure all the xml had loaded I think.
>
>
>
> The problem as I recall it was that by the time you could access the name
> property from the xml the page icons current title had already been
> processed. so that you ended up with the first page showing undefined and
> the second page showing the title for the first page.
>
>
>
> I have also noticed the additional form that is available in pageTemplates
> offering glossary etc.
>
>
>
> A while ago I did some work developing a form that allow you to set most
> of the properties for a project. At the time I used it as a separate wizard
> that generated an xml file that I then had code in template.rlt process. I
> uploaded examples to the svn in the  templates folder see Xerte Layout
> Wizard.xtp which is the wizard that generates the xml and Page Templates
> (layout support).xtp that is a page templates project that consumes the xml
> data from the layout wizard.
>
>
>
> Now that I have seen how you have implemented the form for the learning
> object I intend to have a go at enhancing it to cover as many layout
> settings as possible.
>
>
>
> Do you have a preference regarding the use of style sheets? There are
> currently a few colour properties that can only be set by a style sheet. So
> in practice everything else could be set from the form, or would you rather
> keep all colours in the style sheet?
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 20 February 2012 11:26, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> Cheers, yes, that seems right. It’s in the engine now, but I haven’t done
> any interface stuff yet:
>
>
>
> Do we want to just swap the functionality of the exising ‘back’ button to
> be ‘goBack()’ rather than prevPage()?
>
>
>
> i.e. if you hit the existing back button, you get this history back,
> rather than the linear ‘go to the page with a number one lower than this
> page’s number?’
>
>
>
> That might actually make a sense. Linear users will still go back as at
> present, but branching content will work as expected? I’m not missing
> anything am I?
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 17 February 2012 12:05
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I think this may be why I didn't put the page on the stack if the back
> button was pressed.
>
> e.g. stack shown in brackets
>
> In A
>
> exit A go to B - Push A onto stack  [A]
>
> in B [A]
>
> exit B go C - Push B onto stack [A,B]
>
> in C [A,B]
>
> exit C using back button -  [A,B] -  Pop last entry out of stack and go to
> it
>
> in B [A]
>
> exit B go to D - Pop B onto stack [A, B]
>
> in D [A,B]
>
> exit D using back button - [A,B] - pop last entry out of stack and go to it
>
> in B [A]
>
>
>
> This appears to be consistent with what opera does in the scenario you
> described below.
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 17 February 2012 09:32, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> I’m going back a long time now, but is that consistent with the way
> browsers do things?
>
>
>
> So if you go a -> b -> c <- b -> d <-b where do you goBack() to next in a
> browser?
>
>
>
> You go to a. Our method would take you to c. I don’t know what happens
> here but it seems the browser looks for the first entry in the array,
> rather than the last entry of the current location - but I’m not sure. I
> think this is what I figured out when I looked at this before - and left it
> for another day…
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Julian Tenney
> *Sent:* 16 February 2012 13:28
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I’m thinking have an array, push each page index into as each page is
> visited. To go back, pop the last entry off the array (the current page
> index), and then navigate to the last entry in the array.
>
>
>
> Now, that seems easy enough, but I remember a long time ago finding some
> sort of complication with this…? Does that make sense?
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 16 February 2012 12:59
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> With a project using routed pages it may be that a single page could get
> visited more than once from different pages. Would this approach be able to
> cover this situation?
>
>
>
> With a back button how far back would we need to go?
>
>
>
> I don't know if arrays are limited in their length, but a capability of
> holding the last 255 pages ought to be enough?
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 16 February 2012 12:07, Dave Burnett <d_b_burnett at hotmail.com> wrote:
>
>
> Maybe not keep a stack, but write into the xml of each page as you hit it:
> "this is who sent me"?
>
>
> ------------------------------
>
> From: Julian.Tenney at nottingham.ac.uk
> To: xerte-dev at lists.nottingham.ac.uk
>
> Date: Thu, 16 Feb 2012 10:17:03 +0000
>
>
> Subject: [Xerte-dev] Re: navigating to page name
>
> How best to tackle the ‘goBack’ functionality? It’s not as simple as
> remembering the last page, there’s a stack of pages to manage so that you
> can back up through all the pages. That’s going to take me longer than I’ve
> got today…
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Julian Tenney
> *Sent:* 16 February 2012 10:14
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> Enable controls takes an optional second parameter to alpha the controls,
> so you can fade them when you disable them. I’ll add the contBtn to the
> lsit.
>
>
>
> INTERFACE.prototype.enableControls = function(bool, alpha) {
>
>                 for (var i = 0; i<this.controls.length; i++) {
>
>                                 this.controls[i].enabled = bool;
>
>                                 if (arguments.length>1) {
>
>                                                 this.controls[i]._alpha =
> alpha;
>
>                                 }
>
>                 }
>
> };
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Ron Mitchell
> *Sent:* 15 February 2012 22:26
> *To:* 'For Xerte technical developers'
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> Ok have tested this...
>
>
>
> option 1
>
> rootIcon.enableControls(false); works ok but doesn't disable the continue
> button and I'm not sure it's best solution without some visual indication
> that the controls are disabled. However using that in combination with
> setting the alpha on the relevant buttons works well e.g.
>
> rootIcon.enableControls(false);
>
> _level0.engine.IFC.nextBtn._alpha = 30;
>
> _level0.engine.IFC.backBtn._alpha = 30;
>
> _level0.engine.IFC.contButton._alpha = 30;
>
> _level0.engine.IFC.tocBtn._alpha = 30;
>
> _level0.engine.IFC.contButton.enabled= 0;
>
>
>
> Shouldn't the continue button be part of controls?
>
> I couldn't find a way to set the alpha of controls in one go?
>
>
>
> option 2
>
> rootIcon.hideControls() ; works well and is obviously more efficient than
> all those separate lines of script I had but what's the opposite e.g.
> rootIcon.showControls(); which doesn't seem to exist?
>
> That said I think option 1 is better e.g. controls still showing but
> visually disabled.
>
>
>
> I put a slightly update example online but noticed the sounds don't play -
> I guess I need to preload or use an event for that to work online?
> http://mitchellmedia.co.uk/xerte/branching_image_example/
>
>
>
> Cheers
>
> Ron
>
>
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Ron Mitchell
> *Sent:* 15 February 2012 16:36
> *To:* 'For Xerte technical developers'
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> Glad you see the point - wasn't sure that would be clear without a proper
> example but yes I'm excited by lot's of possibilities with this.
>
>
>
> Yes I figured it was better placed under Navigators than Interactivity but
> happy to go along with what you think.
>
>
>
> I'm not sure what this has in common with Jonathans scenario page but from
> what I saw on the first of those two dev days this possibly meets a
> different need/user. My focus here really is the creation of a visual page
> where the visuals are created externally but the links are easily added via
> the interface. I'm pretty sure the staff I work with will like it and put
> it to good use.
>
>
>
> I'll have a look at the alternative controls options. I agree what I did
> there seems wrong but I searched the mailing list archive and found that as
> a solution. Will have a look at the other options and test and report back.
>
>
>
> So as you'll have seen the hotspot options at the moment include the
> following:
>
> internal link via page title
>
> internal link via dropdown e.g. next, prev, first, last
>
> external link
>
> sound
>
>
>
> The other thing I wondered about was having a pop up option where the text
> added to that nested page is displayed in a popup when clicked and the
> popup can be dragged around or closed. Is there anything existing for that?
>
>
>
> Cheers
>
> Ron
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Julian Tenney
> *Sent:* 15 February 2012 15:57
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I like what you’re driving at here, seems to work well. Not sure about
> hiding / showing the interface buttons (I prefer to grey out or dull
> inactive buttons rather than make them appear / disappear, and that would
> be consistent with other xerte design stuff).
>
>
>
> Is this a ‘Navigators’ page type?
>
>
>
> What does it have in common with Jonathan’s ‘scenario’ page?
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Ron Mitchell
> *Sent:* 14 February 2012 17:05
> *To:* 'For Xerte technical developers'
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> It can be an ugly application too - especially late at night! ;-)
>
>
>
> With Jonathan's talk of branching on a regular basis and inspired by the
> recent rapid e-learning blog post about comic strip type interactions e.g.
> http://www.worldwarfighter.com/hajikamal/activity/ and
> http://www.brokencoworker.com/
>
>
>
> I've been working on an additional page template page that I've had in
> mind for years ;-) that for now I've called branching image. It's basically
> a revision of the image hotspots page which links to internal or external
> destinations rather than displaying hot spot panels. Here a quick test -
> I'm hoping you'll be happy to include this in the official page template?
> http://dl.dropbox.com/u/1388941/branching_image_example.zip
>
>
>
> Cheers
>
> Ron
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Julian Tenney
> *Sent:* 14 February 2012 16:35
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> >Xerte is such a beautiful application
>
>
>
> You made me smile there. It’s all good stuff, and I’m really grateful for
> all the work you’re putting in. Yes, these are all good questions for the
> future. It’s a bit like the old Authorware community: all these people who
> really got what AW was all about, how fast and easy it was to build complex
> stuff (to a point); it’s the same with the people who get Xerte (I like to
> think), unfortunately, they remain relatively few in number (but not a bad
> number for a marketing budget of zero). If you think back though, there
> was  time when Macs were only being used by a very small number of zealous
> maniacs…
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Kemp Johnathan
> *Sent:* 14 February 2012 16:17
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I can understand why the focus may be on how the data that currently
> exists in XOT projects can be output as HTML5.
>
>
>
> XOT offers a tremendous facility in which to develop learning resources
> that can be shared with other institutions, but not a friendly environment
> for the creation of new page designs.
>
>
>
> I believe that people will find in Xerte 2.18 (with the integration of
> individual page templates and availability in several languages) a really
> friendly and useful platform in which new page designs for XOT can be
> created. This opens up the potential for the Xerte / XOT project to benefit
> from the expertise of people all over the world who may develop and share
> their page designs.
>
>
>
> I hope that in all the thoughts about the future of XOT some weight will
> be given to how the wider XOT community might be facilitated to create new
> page designs as XOT moves over to HTML5. Xerte is such a beautiful
> application perhaps it might inform the solution to this question.
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
>
>
> On 14 February 2012 14:44, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> Yeah, carry on, you’re much closer to this than I am at the minute.
>
>
>
> We’re currently in a wait and see about some funding for HTML5 output from
> toolkits: in the long run that’s likely to be where my effort goes, and
> it’s something we’re going to do anyway – the funding will just help us
> prioritise the work.
>
>
>
> I don’t know what the answer is, but we do need to think about how those
> two tools (Toolkits, primarily outputting HTML5) and Xerte (making .xml for
> an AS2 runtime) complement each other. The wizard is possibly the only
> thing in common in the end: our first attempts will be to take the existing
> data from toolkits and run it into HTML(5) somehow. I can see the two
> things existing in parallel for a good while yet (think, maybe 3 – 5 years)
> but ultimately I can see toolkits de-coupling from Xerte. There is a lot of
> traction in toolkits, and a lot more potential if it didn’t rely on Flash.
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 14 February 2012 14:36
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I don't know if you have had a chance to work with the version of the
> Xerte interface that includes Tom's modifications for individual page
> templates, but it has really enhanced desktop Xerte as a development
> environment.
>
>
>
> I can pick a page from a menu and see hints and thumbnails, just as you do
> in XOT or a page templates project. When I select a page from the menu it
> creates a folder for the page, copies the page's xwd to the folder and
> automatically generates the xml for the page based on the xwd, saving it in
> the page's folder. In addition it adds a new page to the project tree using
> the page's rlm file.
>
>
>
> This then leaves me in the desktop xerte environment with each page having
> its own xwd and xml contained in its own folder. I can tinker with the
> page's icon structure or just consume the page as originally specified,
> whilst populating the page's data using the xwd form.
>
>
>
> I can edit the page's xwd in FlashDevelop to add extra features and update
> the page's structure to consume them. I have full access to all the
> project's pages and every page's icons.
>
>
>
> In desktop Xerte using individual page templates, once a page has been
> created any change to Xerte's copy of the xwd file or rlm file does not
> affect the page in the project, unlike in XOT where template.xwd and the
> set of  rlm files are accessed when the project runs, thus resulting in any
> changes to these files affecting all projects.
>
>
>
> It is a great environment in which to develop new pages from existing ones.
>
>
>
> Can you see any problem with the approach I am intending to take with
> respect to the routed paging? Are you happy for me to continue with this
> proposed solution to the issue?
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 14 February 2012 14:09, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> OK, maybe we’re just in slightly different worlds, me toolkits, you xerte.
> You paste in models through the editor? (I can’t remember) and then
> essentially don’t care about that model ever again: it’s just there waiting
> for some xml payload to drive it?
>
>
>
> Do you actually add the child icons (i.e. essentially the same thing as
> pasting in the model manually at design time? Or do you create a reference
> to an external model file a la toolkits?
>
>
>
> I can see it is tricky to set the icon property at design time.
>
>
>
> There must be a way to set the name property at runtime, but maybe not so
> easy of you’ve pasted the whole set of icons into the main piece – which is
> what I think you do..?
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 14 February 2012 14:05
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> There may be something wrong in my understanding of how things are working
> here but my reasons for not going down this route were
>
>
>
> 1) The script you quote is from templates.rlt and does not exist in an
> individual page template project - though something similar could perhaps
> be added.
>
> 2) In an individual page template project there is no project wide
> external xml file, rather each separate page has its own external xml file.
>
> 3) I am seeking to implement a solution that works for both pageTemplates
> and individual page template projects.
>
> 4) Even if this can be made to work for individual page template files I
> am still wary of using the name property (title field in the xwd form) as
> the unique identifier as I think it is already being used to meet a
> different purpose that could compromise it as a unique id. A project that
> used routing could easily be compromised by a late decision to change the
> title of a page. Which would affect every page that had been set up to
> route to it. With a separate pageID used only as the identifier for routing
> purposes this issue is avoided.
>
>
>
> Since routed pages are not yet a feature of Xerte it makes sense to get a
> solution that is robust. Have I missed something in my approach? Is there
> anything in the approach that I am proposing that would be detrimental to
> the project?
>
>
>
> I have performed some limited tests with this approach using my scenario
> page in both  pageTemplates and individual page template projects and thus
> far it has worked reliably.
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
> On 14 February 2012 13:32, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> > Part of the problem has been the lack of a suitable identifier for each
> page that could be set within an xwd form
>
>
>
> Why can’t you set attributes on the icon in the makePages script, in these
> bits of code?
>
>
>
> if (modName == 'xerteModel'){
>
>   newXML = new XML('<PG model="' +
> extXML.firstChild.childNodes[i].attributes.modelFile + '"/>');
>
>   //is there an initObject...?
>
>   if (extXML.firstChild.childNodes[i].attributes.initObject != undefined){
>
>     newXML.firstChild.attributes.initObject =
> extXML.firstChild.childNodes[i].attributes.initObject;
>
>   }
>
> } else {
>
>  newXML = new XML('<PG model="templatePath + \'models/' + modName +
> '.rlm\'"/>');
>
> }
>
> newChild = newXML.firstChild;
>
> newChild.attributes.title = extXML.firstChild.childNodes[i].
> attributes.name;
>
> newChild.attributes.linkID =
> extXML.firstChild.childNodes[i].attributes.linkID;
>
>
>
> if (extXML.firstChild.childNodes[i].attributes.linkID == _level0.linkID &&
> extXML.firstChild.childNodes[i].attributes.linkID != undefined){
>
>   linkIndex = i;
>
> }
>
> ifc.appendChild(newChild);
>
>
>
> newChild is the xml that is added to the interface. The engine then loads
> up the modesl identified in each page attached, but does not replace the
> page icons you create here.
>
>
>
> You won’t see the changes at design time(i.e. populate the name property
> in the xerte editor), but they can be set at runtime, and thus be used for
> navigation.
>
>
>
>
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Kemp Johnathan
> *Sent:* 14 February 2012 12:36
>
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> I have considered how to implement the ability to route pages for some
> time now. Part of the problem has been the lack of a suitable identifier
> for each page that could be set within an xwd form. In page wizards I used
> the "name" field of the page icon, but this is not definable from an xwd
> form.
>
>
>
> In pageTemplates projects the xwd defined name value is used as the page
> title and there is no way to set the page Icon name property. The page
> title is a bad candidate as a unique identifier as its main function is to
> be a a page title making it potentially lengthy, potentially liable to
> change, possibly even unique and probably more prone to error in typing
> when referring to it as a page destination.
>
>
>
> As part of the move to individual page templates I am including in every
> xwd file an optional property pageID the purpose of which is to act solely
> as an identifier to enable other pages to locate it in the project.
>
>
>
> I have a number of page wizards that I will be converting to individual
> page templates that offer routing i.e. the ability to specify a target page
> which the user will be taken to on completing an action e.g. making a
> selection from a multiple choice question, clicking on a link in some text
> etc. These will use the new pageID property.
>
>
>
> This is achieved by using the following code.
>
>
>
> In the rlm file's getPageID script the following opening is used for any
> page that offers routing
>
>
>
> if (extXML == undefined){ // Page Wizard
>     pageIcon.templateData = pageIcon.extXML.toObject();
>     pageIcon.templateData = pageIcon.templateData.pageWizard[0];
>
>     // routed pages only
>     pageID_array = new Array();
>     for (i = 0; i < rootIcon.pages.length; i++){
>
> pageID_array.push(rootIcon.pages[i].extXML.firstChild.childNodes[0].attributes.pageID);
>     }
>
> } else { // Toolkits
>    myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() -
> pgOffset]);
>    pageIcon.templateData = myXML.toObject();
>    rootIcon.setTitleText(templateData.learningObject[0].name);
>
>    // routed pages only
>    pageID_array = new Array();
>    for (i = 0; i < extXML.firstChild.childNodes.length; i++){
>      pageID_array.push(extXML.firstChild.childNodes[i].attributes.pageID);
>    }
> }
>
>
>
> This makes available to the routed page an array of every page in the
> project with a value for pageID where it has been defined.
>
>
>
> Navigation to a page can then be handled in a manner such as
>
> // navigate to destination page
> for (i = 0; i < pageID_array.length; i++){
>    if (pageID_array[i] == destPageName){
>      pageFound = "true";
>      destinationIndex = i;
>      rootIcon.gotoPage(destinationIndex);
>    break;
>   } else {
>     pageFound = "false";
>   }
> }
>
>
>
> This will open up the potential to create a variety of "routed" pages
> which all use a standard method of page identification.
>
>
>
> Kind regards
>
>
>
> Johnathan
>
>
>
>
>
>
>
>
>
> On 14 February 2012 09:50, Julian Tenney <Julian.Tenney at nottingham.ac.uk>
> wrote:
>
> Ah, the other gotcha is that those asfunc calls need the full path to the
> object.
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Ron Mitchell
> *Sent:* 14 February 2012 08:24
> *To:* 'For Xerte technical developers'
>
>
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> :-)
>
> sleep worked!
>
> Got it working with _level0.engine.navToPage(pagetitletogoto);
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Dave Burnett
> *Sent:* 14 February 2012 00:43
> *To:* xerte-dev at lists.nottingham.ac.uk
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
> So much for in vino veritas.
> ------------------------------
>
> From: ronm at mitchellmedia.co.uk
> To: xerte-dev at lists.nottingham.ac.uk
> Date: Tue, 14 Feb 2012 00:31:28 +0000
> Subject: [Xerte-dev] Re: navigating to page name
>
> Thanks for the suggestion Dave
>
> but I've pretty much tried that but it's not working e.g. if I
> debug(myPageIndex); it's coming up undefined.
>
> Time to shut down and have another look in the morning.
>
> Cheers
>
> Ron
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Dave Burnett
> *Sent:* 14 February 2012 00:22
> *To:* xerte-dev at lists.nottingham.ac.uk
> *Subject:* [Xerte-dev] Re: navigating to page name
>
>
>
>
> http://lists.nottingham.ac.uk/pipermail/xerte/2010-April/004972.html
>
> ??
>
>
>
> I've had a couple pints, so I may be missing the point.
>
> :-)
>
>
> ------------------------------
>
> From: ronm at mitchellmedia.co.uk
> To: xerte-dev at lists.nottingham.ac.uk
> Date: Tue, 14 Feb 2012 00:10:31 +0000
> Subject: [Xerte-dev] navigating to page name
>
> Hi
>
> I think I'm missing something silly here :-(
>
> In a script icon in a page templates project I want to dynamically pass a
> page title to navigate to that page.
>
>
>
> I know <a href="asfunction:_level0.engine.navToPage,yourpagetitle">Click
> here or some other wording</a> works in xot as a hyperlink but haven't
> managed to call the same function in a script icon?
>
>
>
> Or is there another/easier way of doing this e.g. navigating to a page
> title in a page templates project?
>
>
>
> Cheers
>
> Ron
>
>
>
>
>
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
> This message has been checked for viruses but the contents of an
> attachment may still contain software viruses which could damage your
> computer system: you are advised to perform your own checks. Email
> communications with the University of Nottingham may be monitored as
> permitted by UK legislation.
>
> _______________________________________________ Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev This message and
> any attachment are intended solely for the addressee and may contain
> confidential information. If you have received this message in error,
> please send it back to me, and immediately delete it. Please do not use,
> copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham. This
> message has been checked for viruses but the contents of an attachment may
> still contain software viruses which could damage your computer system: you
> are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
> _______________________________________________ Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev This message and
> any attachment are intended solely for the addressee and may contain
> confidential information. If you have received this message in error,
> please send it back to me, and immediately delete it. Please do not use,
> copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham. This
> message has been checked for viruses but the contents of an attachment may
> still contain software viruses which could damage your computer system: you
> are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________ Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev This message and
> any attachment are intended solely for the addressee and may contain
> confidential information. If you have received this message in error,
> please send it back to me, and immediately delete it. Please do not use,
> copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham. This
> message has been checked for viruses but the contents of an attachment may
> still contain software viruses which could damage your computer system: you
> are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it.   Please do
> not use, copy or disclose the information contained in this message or in
> any attachment.  Any views or opinions expressed by the author of this
> email do not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120227/194f4dd0/attachment-0001.html>


More information about the Xerte-dev mailing list