[Xerte] Re: Creating new template question

Dave Burnett d_b_burnett at hotmail.com
Thu Aug 30 18:59:28 BST 2012



Thanks Johnathan.
I just opened a new file in Xerte and then inserted the drag/drop .rlm I am trying to alter.
so I added the templateData path in the LO and then used just   
  pageIcon.templateData = extXML.toObject();  pageIcon.templateData = pageIcon.templateData.learningObject[0];
to get the data loaded.
Why am I using learningObject and you are using pageWizardI thought you had deprecated pageWizard.


Date: Thu, 30 Aug 2012 18:25:56 +0100
From: johnathan.kemp at ntlworld.com
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Creating new template question

You are using an old model file probably from a page wizard.
The new model files use
pageIcon = icon.parentNode.clip();

if (rootIcon.projMode == "dev"){ 

  // Page Wizard
  pageIcon.templateData = pageIcon.extXML.toObject();
  pageIcon.templateData = pageIcon.templateData.pageWizard[0];
} else {
  // Toolkits
  myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);

  pageIcon.templateData = myXML.toObject();

}
A setup script off the entryFrame of a "pages" type project sets 
rootIcon.projMode = "dev";

This ensures the model file behaves correctly for a desktop Xerte project. This value is not set in XOT projects which enables the same model file to be used in both Xerte and XOT. The idea being that people will be able to develop new page types in Xerte and then transfer them to a XOT environment.

Refer back to my other reply for an idea of how I approach the creation of a new page. Even if you don't follow the same steps it should guide you as to what else you need to do.

Kind regards
Johnathan
On 30 August 2012 15:42, Dave Burnett <d_b_burnett at hotmail.com> wrote:






I'm playing with the new 2.18 version (Thanks to Johnathan and all!).
I've made a new template and can load it onto the flowline.
Now I want to alter the underlying model and to do that I need to get test data into it.

So I open a new file and insert the .rlm from the models file.
In the first script icon of the .rlm we have:
if (extXML == undefined){
  // Page Wizard  pageIcon.templateData = pageIcon.extXML.toObject();  pageIcon.templateData = pageIcon.templateData.pageWizard[0];

Am I missing something, e.g. if extXML is undefined, won't pageIcon.extXML also be undefined?

What I need to do obviously is get data into pageIcon.templateData in order to get the model to function.

Cheers,Dave






 		 	   		  


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 mailing list

Xerte at lists.nottingham.ac.uk

http://lists.nottingham.ac.uk/mailman/listinfo/xerte



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 mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

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/attachments/20120830/061dce92/attachment.html>


More information about the Xerte mailing list