[Xerte-dev] Re: icons killed on page turn?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue Jan 24 14:20:02 GMT 2012


I had thought about handling this in the engine and having something in XMLNode.prototype.duplicate() that would say

If (this.built != true){
  //dupe away...
  this.built = true;
}

But wasn't sure if you'd ever want to run it more than once. I suppose that could be overridden, like

icon.nextSibling.duplicate(n, true);// insists on the dupe even if it's been done before.


From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 24 January 2012 14:13
To: For Xerte technical developers
Subject: [Xerte-dev] Re: icons killed on page turn?

More or less, yes. If you initialise anything in there, it won't be initialised again when the page is re-made.

What it stops happening is this:

SCR //icon.nextSibling.duplicate(numOfIcons - 1)
DIS //an icon...

...shows numOfIcons icons, right?

If you let that dupe code run again when the page is re-encountered, you're gonna end up with twice as many icons etc.

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 24 January 2012 14:10
To: xerte-dev at lists.nottingham.ac.uk
Subject: [Xerte-dev] Re: icons killed on page turn?

So that logic should really only wrap dupe statements?

________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte-dev at lists.nottingham.ac.uk
Date: Tue, 24 Jan 2012 14:02:23 +0000
Subject: [Xerte-dev] Re: icons killed on page turn?
icon is the xml. So it only needs the duping done once: if the resulting movieclip is killed, the xml still exists in its manipulated state ready to be parsed again.


From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 24 January 2012 14:00
To: xerte-dev at lists.nottingham.ac.uk
Subject: [Xerte-dev] icons killed on page turn?


J, when do icons get killed?

I have this logic in calcs all over the place:

if (icon.built != 'true') {

blah


and thought that it would reset to undefined upon page turn, but I'm finding that not the case.

??








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/20120124/9bc9e685/attachment-0001.html>


More information about the Xerte-dev mailing list