<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<div><br></div><div>Thanks Johnathan.</div><div><br></div><div>I just opened a new file in Xerte and then inserted the drag/drop .rlm I am trying to alter.</div><div><br></div><div><span style="font-size: 10pt; ">so I added the templateData path in the LO and then used just </span></div><div><br></div><div><div> pageIcon.templateData = extXML.toObject();</div><div> pageIcon.templateData = pageIcon.templateData.learningObject[0];</div></div><br>to get the data loaded.<div><br></div><div>Why am I using <span style="font-size: 10pt; ">learningObject and you are using </span><span style="font-size: 10pt; ">pageWizard</span></div><div><span style="font-size: 10pt; ">I thought you had deprecated pageWizard.</span></div><div><span style="font-size: 10pt; "><br></span></div><div><br></div><div><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Thu, 30 Aug 2012 18:25:56 +0100<br>From: johnathan.kemp@ntlworld.com<br>To: xerte@lists.nottingham.ac.uk<br>Subject: [Xerte] Re: Creating new template question<br><br><div>You are using an old model file probably from a page wizard.</div><div><br></div><div>The new model files use</div><div><br></div><div>pageIcon = icon.parentNode.clip();<br><br>if (rootIcon.projMode == "dev"){ <br>
// Page Wizard<br> pageIcon.templateData = pageIcon.extXML.toObject();<br> pageIcon.templateData = pageIcon.templateData.pageWizard[0];<br>} else {<br> // Toolkits<br> myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);<br>
pageIcon.templateData = myXML.toObject();<br><br>}</div><div><br></div><div>A setup script off the entryFrame of a "pages" type project sets </div><div><br></div><div>rootIcon.projMode = "dev";</div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div>
<div>Kind regards</div><div><br></div><div>Johnathan</div><br><div class="ecxgmail_quote">On 30 August 2012 15:42, Dave Burnett <span dir="ltr"><<a href="mailto:d_b_burnett@hotmail.com">d_b_burnett@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
<div><br></div><div>I'm playing with the new 2.18 version (Thanks to Johnathan and all!).</div><div><br></div><div>I've made a new template and can load it onto the flowline.</div><div><br></div><div>Now I want to alter the underlying model and to do that I need to get test data into it.</div>
<div><br></div><div>So I open a new file and insert the .rlm from the models file.</div><div><br></div><div>In the first script icon of the .rlm we have:</div><div><br></div><div><span style="font-size:10pt">if (extXML == undefined){</span></div>
<div><div> // Page Wizard</div><div><span style="font-size:10pt"> pageIcon.templateData = pageIcon.extXML.toObject();</span></div><div> pageIcon.templateData = pageIcon.templateData.pageWizard[0];</div><div><br></div></div>
<div>Am I missing something, e.g. if <span style="font-size:10pt">extXML is undefined, won't </span><span style="font-size:10pt">pageIcon.extXML also be undefined?</span></div><div><span style="font-size:10pt"><br></span></div>
<div><span style="font-size:10pt">What I need to do obviously is get data into </span><span style="font-size:10pt">pageIcon.templateData in order to get the model to function.</span></div><div><span style="font-size:10pt"><br>
</span></div><div><span style="font-size:10pt">Cheers,</span></div><div>Dave</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div> </div><br>
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.
<BR>
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.
<BR>
</div>
<br>_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br>
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.<br>
<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system:<br>
you are advised to perform your own checks. Email communications with the<br>
University of Nottingham may be monitored as permitted by UK legislation.<br>
<br>
<br></blockquote></div><br>
<br>_______________________________________________
Xerte mailing list
Xerte@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.</div></div> </div></body>
</html>