<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br>a) remember it is zero-based.<br><br>So firstChild is the same as childNodes[0]<br><br>b) "You would have to adjust all the relative references"<br><br>There are other references in the piece that are not expecting that additional icon.<br> <br>Dave<br><br><br><br><br><br><br><br><br><hr id="stopSpelling">From: patricia@e-w-i.nl<br>To: xerte@lists.nottingham.ac.uk<br>Date: Mon, 4 Apr 2011 10:10:18 +0200<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 .ecxhmmessage P
{padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;}
.ExternalClass BODY.ecxhmmessage
{font-family:Tahoma;font-size:10pt;}
</style>
<div><font face="Arial">Thank you Dave,</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">I am a bit further now. But still have some
trouble.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">Now I have :</font></div>
<div><font face="Arial">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.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">I made 3 pages with the template</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"><em>I changed the code in the makepagesicon into:
</em></font></div>
<div><font face="Arial"><em></em></font> </div>
<div><font face="Arial"><em>icon.nextSibling.<strong>childNodes[2].</strong>duplicate(templateData.presentation[0].page.length
- 1);</em></font></div>
<div><font face="Arial"><em></em></font> </div>
<div><font face="Arial"><em>icon.nextSibling.attributes.title =
templateData.presentation[0].name;</em></font></div>
<div><em></em> </div>
<div><font face="Arial"><em>//set the page titles<br>for (i = 0; i <
templateData.presentation[0].page.length; i++){<br>
icon.nextSibling.childNodes[i].attributes.title =
templateData.presentation[0].page[i].name;<br>}</em></font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">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.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">Then I changed
</font><div><font face="Arial"><font face="Arial"><em>icon.nextSibling.<strong>childNodes[2].</strong>duplicate(templateData.presentation[0].page.length
- 1); </em></font></font></div>
<div><font face="Arial"><font face="Arial">into </font></font></div>
<div><font face="Arial"><font face="Arial"><font face="Arial"><em>icon.nextSibling.<strong>childNodes[1].</strong>duplicate(templateData.presentation[0].page.length
- 1);</em></font></font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial">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.</font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial">I should think <strong>icon.nextSibling.childNodes[2]</strong> is the
protoPage? But why doesn't that work? and why do I get some result
with <em>icon.nextSibling.<strong>childNodes[1]</strong>?</em> And why I
don't get page 1 then?</font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial">Patricia</font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial"> </font></font></div>
<div><font face="Arial"><font face="Arial"></font></font><font face="Arial"></font> </div></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;">
<div style="font: 10pt arial;">----- Original Message ----- </div>
<div style="font: 10pt arial; background: none repeat scroll 0% 0% rgb(228, 228, 228);"><b>From:</b>
<a title="d_b_burnett@hotmail.com" href="mailto:d_b_burnett@hotmail.com">Dave
Burnett</a> </div>
<div style="font: 10pt arial;"><b>To:</b> <a title="xerte@lists.nottingham.ac.uk" href="mailto:xerte@lists.nottingham.ac.uk">Xerte list</a> </div>
<div style="font: 10pt arial;"><b>Sent:</b> Friday, April 01, 2011 8:21
PM</div>
<div style="font: 10pt arial;"><b>Subject:</b> [Xerte] Re: simple
presentation</div>
<div><font face="Arial"></font><br></div><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><br>
<hr id="ecxstopSpelling">
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<br><br>
<style>
</style>
<div><font face="Arial" size="2">Hi, I am very new in Xerte.</font></div>
<div><font face="Arial" size="2">I am trying to understand the simple presentation
template.</font></div>
<div><font face="Arial" size="2">I would like to ad an entry frame to
the interface icon and then add som cusom buttons.</font></div>
<div><font face="Arial" size="2">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.</font></div>
<div><font face="Arial" size="2">What I am doing wrong?</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Thanks for any help</font></div>
<div><font face="Arial" size="2">Patricia</font></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><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.
<BR><hr>
<BR>_______________________________________________<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.<br><br></blockquote>
<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>