[Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Mon Feb 27 13:30:56 GMT 2012
I think it's passed into the piece from the web page as the variable 'file'. It will be on _level0.
From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Kemp Johnathan
Sent: 27 February 2012 13:30
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
I believe you, but I'm b******d if I can find it.
I can find a number of calls to jumpFile e.g. jumpFile(FILE);
but I can't find where FILE is assigned a value.
I have inspected in Xerte
engine
engine.IFC
_level0.engine
there is a urls property but it is, in a simple project, an array of 0 length.
I am sorry, I don't know where else to look and I need the time to work on the rest of the 2.18 stuff.
I will see how much progress I can make over the next few days and then try again.
Kind regards
Johnathan
On 27 February 2012 12:36, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
But in thepreloader the xml is laoded. So it must know what file to load in there somewhere.
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Kemp Johnathan
Sent: 27 February 2012 12:23
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
OK I can see in MainPreloader the jumpFile(url) method, and its reference to
this.contentXML._url
but if I try in xerte to
debug("contentXML = " + _level0.contentXML._url);
I still get contentXML = undefined.
If I try
debug("contentXML = " + contentXML._url);
I get
contentXML = file://C:\Xerte2\XMLEngine.swf?id=133401039
I don't know enough about the workings of Flash and Xerte to make any changes here but if you are able to add some code that will make the rlo or rlt file name (or even just the extension) accessible as a property I can test against, then I could use this as my test for desktop V XOT / pageTemplate.
Kind regards
Johnathan
On 27 February 2012 07:55, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
If you look in MainPreloader, you'll see how the variable is getting set: maybe put something in there to store the path / fileType better?
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Kemp Johnathan
Sent: 25 February 2012 21:13
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Hello Julian,
_level0.contentXML._url - this returns undefined
_level0.engine.contentXML._url or rootIcon.contentXM._url both return
file://C:Xerte2\XMLEngine.swf?id=77679910
(my install folder is C:\xerte2)
Kind regards
Johnathan
On 24 February 2012 10:20, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>> wrote:
Test this:
_level0.contentXML._url
It should be the url to the rlo / rlt file, with the extension on the end.
-----Original Message-----
From: Tenney Julian
Sent: 24 February 2012 09:41
To: 'For Xerte technical developers'
Subject: RE: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
if (pageIcon.extXML != undefined){
// Page Wizard
Yes, I think that will work. In any case, any engine test could also be written in the template.rlt, it will only use the same information to judge the situation.
Some usful thigns for testing environments:
if the LO has template data...
if a page has templateData...?
if mdm != undefined you are at design time in xerte on windows
if templatePath != undefined you are on a toolkits server else you're not.
-----Original Message-----
From: Tenney Julian
Sent: 22 February 2012 13:47
To: For Xerte technical developers
Subject: RE: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
They don't at the moment, but I think you need an engine-side test. I'll write something for you.
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Kemp Johnathan [johnathan.kemp at ntlworld.com<mailto:johnathan.kemp at ntlworld.com>]
Sent: 22 February 2012 07:18
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Would it ever be the case that a XOT project would assign a value to a page Icon's templateData property?
If this would never happen then I can just reverse the original test, instead of testing for a project extXML I can test for pageIcon.extXML
if (pageIcon.extXML != undefined){
// Page Wizard
What do you think?
Kind regards
Johnathan
On 21 February 2012 16:54, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk><mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>>> wrote:
Maybe you can check the value of the templateData attribute on LO icon? If undefined, it must be page wizards... otherwise irs either XOT or a desktop template project.
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>>] On Behalf Of Kemp Johnathan
Sent: 21 February 2012 16:53
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Neither am I.
I was going to ask you if you had any ideas where I would be able to access it.
Is the project file in a XOT project always called template? as in template.rlt.
It might be easier to check the file name rather than the extension as this will be available in templateData.
Kind regards
Johnathan
On 21 February 2012 14:38, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk><mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>>> wrote:
Not sure how you get it mind.
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>>] On Behalf Of Kemp Johnathan
Sent: 21 February 2012 14:38
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Sounds do-able, i'll have a go.
JK
On 21 February 2012 13:16, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk><mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>>> wrote:
Could you work on the filename, so if rlt else pageTemplates?
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>>] On Behalf Of Kemp Johnathan
Sent: 21 February 2012 12:52
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon
Hello Julian,
Thanks for a quick fix - all tests so far suggest this has solved the problem :-)
Now that I am working on a default .rlo file for the "page projects" I am including a template and xwd file which is resulting in there being an extXML, it also means that now the project can take the project name from the extXML file just as with pageTemplates / XOT.
So I need a new test for identifying when the model is in XOT / pageTemplate projects and when it is in a desktop project.
What I would like to do is work on the principle that in XOT / pageTemplate projects the setup script will define a variable "xMode"
Then I can replace the original block
if (extXML == undefined){
// 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();
rootIcon.setTitleText(templateData.learningObject[0].name);
}
with
if (xMode == undefined){
// Page Wizard
pageIcon.templateData = pageIcon.extXML.firstChild.toObject();
// pageIcon.templateData = pageIcon.templateData.pageWizard[0];
} else {
// Toolkits
myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);
pageIcon.templateData = myXML.toObject();
// rootIcon.setTitleText(templateData.learningObject[0].name);
}
rootIcon.setTitleText(templateData.learningObject[0].name);
The commented lines of code would be removed - they are just there to make explicit the changes I am proposing.
Not requiring to define a value for xMode in a desktop environment would make it easier to use the models in a pure desktop project (i.e. one in which the developer did not even use the "Create new Page Project option"), but it would need that all XOT projects and future pageTemplate projects had the xMode variable set.
What do you think?
Given that the line
rootIcon.setTitleText(templateData.learningObject[0].name);
works, would it also mean that if we had a method for the page icon to set it's title property that we could use
pageIcon.setTitleText(pageIcon.templateData.pageType[0].name);
As a way of overcoming the problem of using the name value to set up the page title display (probably wouldn't sort out the display of page titles in the TOC though) mmm.
Kind regards
Johnathan
On 21 February 2012 11:25, Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk><mailto:Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>>> wrote:
Try this one please.
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>>] On Behalf Of Kemp Johnathan
Sent: 20 February 2012 22:51
To: Xerte Developers Discussion List
Subject: [Xerte-dev] Xerte editor closes if you add a setup script to the Learning Object icon
I've been doing some tests as part of establishing a standard pagetemplate.rlo file for the new version of the xerte editor that handles individual page templates..
However I have hit a problem. I want to include one or more set up scripts as children of the Learning Object.
If you add a setup script then this breaks the process of adding a new page. The folder for the page is created in the "pages" folder and the xwd and xml files are created in the page's folder. However the insertion of the page model file into the project fails. This means that if you select "Yes" when the "Open the wizard" prompt is displayed then Xerte collapses to the task bar and won't open again.
If you then close down Xerte and then re-open the project the project behaves correctly until you try adding another page.
Kind regards
Johnathan
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<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk<mailto: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.
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk<mailto: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.
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk<mailto: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.
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk<mailto: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.
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto: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.
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto: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/20120227/e062152d/attachment-0001.html>
More information about the Xerte-dev
mailing list