[Xerte-dev] Re: Xerte editor closes if you add a setup script to the Learning Object icon

Kemp Johnathan johnathan.kemp at ntlworld.com
Wed Feb 22 11:19:41 GMT 2012


How do you access the information about the extension?

Is this easily accessible from the actionscript of an rlm file, and if so
how?

If there are changes to the editor can you ensure that the change that
Julian made that fixed the problem, that the use of a setup script on the
learning object broke the adding of new pages routine, is included in the
updated editor..

Kind regards

Johnathan

On 22 February 2012 10:18, Tom Reijnders <reijnders at tor.nl> wrote:

>  Julian, Jonathan,
>
> I am not sure whther I committed the latest changes to the editor to fix
> the bug of generating pages beyond 9.
> Julian, is your fix checked in already? I'll check, and let you know (and
> if needed will commit).
>
> In the editor I differentiate between a PageTemplates project and
> (possibly) a Page wizard project (enable or disable the Pages menu) based
> on the extension.
>
> Tom
>
> Op 22-2-2012 8:18, Kemp Johnathan schreef:
>
> 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>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] *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>
>> 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] *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>
>> 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] *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>
>> wrote:
>>
>> Try this one please.
>>
>>
>>
>> *From:* 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
>> 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
>> 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
>> 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
>> 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 listXerte-dev at lists.nottingham.ac.ukhttp://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.
>
>
>
> --
> --
>
> Tom Reijnders
> TOR Informatica
> Chopinlaan 27
> 5242HM Rosmalen
> Tel: 073 5226191
> Fax: 073 5226196
>
>
>
> _______________________________________________
> 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/20120222/1b192ad5/attachment-0001.html>


More information about the Xerte-dev mailing list