<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
And then make sure not to change any names. ;-)<br><br><br><hr id="stopSpelling">From: Julian.Tenney@nottingham.ac.uk<br>To: xerte@lists.nottingham.ac.uk<br>Date: Mon, 4 Apr 2011 10:22:32 +0100<br>Subject: [Xerte] Re: simple presentation<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML"><style>
.ExternalClass .ecxshape
{;}
</style><style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.ecxEmailStyle20
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .ecxMsoChpDefault
{font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;}
.ExternalClass div.ecxWordSection1
{page:WordSection1;}
</style><div class="ecxWordSection1"><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">Use getChildByName() to avoid having to know the structure / number of children.</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">Much better to say icon.parentNode.getChildByName(“myProtoPageName”) than to say icon.nextSibling() etc where if the structure changes, so does your code,</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);">J</span></p><p class="ecxMsoNormal"><span style="font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);"> </span></p><div><div style="border-right: medium none; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;"><p class="ecxMsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';" lang="EN-US">From:</span></b><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';" lang="EN-US"> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Patricia Heijmen<br><b>Sent:</b> 04 April 2011 09:10<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> [Xerte] Re: simple presentation</span></p></div></div><p class="ecxMsoNormal" style="margin-left: 36pt;"> </p><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Thank you Dave,</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I am a bit further now. But still have some trouble.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Now I have :</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">the make pages icon, then the interface icon, the interface icon contains an entry frame, and the protopage. So I addes only an entry frame.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I made 3 pages with the template</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I changed the code in the makepagesicon into: </span></em><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">icon.nextSibling.</span></em><strong><i><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">childNodes[2].</span></i></strong><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">duplicate(templateData.presentation[0].page.length - 1);</span></em><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">icon.nextSibling.attributes.title = templateData.presentation[0].name;</span></em><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">//set the page titles</span></em><i><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"><br><em><span style="font-family: 'Arial','sans-serif';">for (i = 0; i < templateData.presentation[0].page.length; i++){</span></em><br><em><span style="font-family: 'Arial','sans-serif';"> icon.nextSibling.childNodes[i].attributes.title = templateData.presentation[0].page[i].name;</span></em><br><em><span style="font-family: 'Arial','sans-serif';">}</span></em></span></i><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">If I preview the presentation and I got only one page: Page 2. It contains the right text and picture but there should be 3 pages.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Then I changed </span></p><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">icon.nextSibling.</span></em><strong><i><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">childNodes[2].</span></i></strong><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">duplicate(templateData.presentation[0].page.length - 1); </span></em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">into </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">icon.nextSibling.</span></em><strong><i><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">childNodes[1].</span></i></strong><em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">duplicate(templateData.presentation[0].page.length - 1);</span></em><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Then with previewing I got 3 pages, it doesn't show page 1, then it shows page 2 and 3 (with correct pictures and text) and then it shows a page undefined.</span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I should think <strong><span style="font-family: 'Arial','sans-serif';">icon.nextSibling.childNodes[2]</span></strong> is the protoPage? But why doesn't that work? and why do I get some result with <em><span style="font-family: 'Arial','sans-serif';">icon.nextSibling.</span></em><strong><i><span style="font-family: 'Arial','sans-serif';">childNodes[1]</span></i></strong><em><span style="font-family: 'Arial','sans-serif';">?</span></em> And why I don't get page 1 then?</span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Patricia</span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div></div><blockquote style="border-width: medium medium medium 1.5pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color black; padding: 0cm 0cm 0cm 4pt; margin-left: 3.75pt; margin-right: 0cm; margin-bottom: 5pt;"><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">----- Original Message ----- </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt; background: none repeat scroll 0% 0% rgb(228, 228, 228);"><b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">From:</span></b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> <a href="mailto:d_b_burnett@hotmail.com" title="d_b_burnett@hotmail.com">Dave Burnett</a> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">To:</span></b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> <a href="mailto:xerte@lists.nottingham.ac.uk" title="xerte@lists.nottingham.ac.uk">Xerte list</a> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Sent:</span></b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> Friday, April 01, 2011 8:21 PM</span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Subject:</span></b><span style="font-size: 10pt; font-family: 'Arial','sans-serif';"> [Xerte] Re: simple presentation</span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><p class="ecxMsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"><br>You have to be very careful around template architecture.<br><br>You see the script icon above the Interface icon called makePages?<br>Open it up and look at the first line of code.<br><br>icon.nextSibling.firstChild.duplicate(templateData.presentation[0].page.length - 1);<br><br>That is making the pages of your presentation:<br><br>icon = here, this icon<br>nextSibling = next icon downward<br>firstChild = next icon rightward<br>duplicate = duplicate<br><br>So it is saying, duplicate the protoPage icon x number of times.<br><br>When you insert your entry pane on to the Interface page, you have inserted a sibling between makePages and the target, protoPage.<br>So the relative logic is destroyed and the piece is not being built.<br><br>You would have to adjust all the relative references in the piece to take into account the added entrypane icon.<br><br>HTH<br>Dave<br><br><br><br><br><br><br><br><br><br><br><br></span></p><div class="ecxMsoNormal" style="margin-left: 36pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"><hr id="ecxstopSpelling" width="100%" align="center" size="2"></span></div><p class="ecxMsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">From: patricia@e-w-i.nl<br>To: xerte@lists.nottingham.ac.uk<br>Date: Fri, 1 Apr 2011 18:23:44 +0200<br>Subject: [Xerte] simple presentation</span></p><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Hi, I am very new in Xerte.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I am trying to understand the simple presentation template.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">I would like to ad an entry frame to the interface icon and then add som cusom buttons.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">However, when I insert an entry frame, the application doesn't work correctly anymore. The text icon shows 'undefined' and I cannot go through the pages.</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">What I am doing wrong?</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"> </span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Thanks for any help</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">Patricia</span><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"></span></p></div><p class="ecxMsoNormal" style="margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"><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><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. </span></p><div class="ecxMsoNormal" style="margin-left: 36pt; text-align: center;" align="center"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';"><hr width="100%" align="center" size="2"></span></div><p class="ecxMsoNormal" style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;"><span style="font-size: 10pt; font-family: 'Tahoma','sans-serif';">_______________________________________________<br>Xerte mailing list<br>Xerte@lists.nottingham.ac.uk<br>http://lists.nottingham.ac.uk/mailman/listinfo/xerte<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.</span></p></blockquote></div><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. </body>
</html>