[Xerte] Annotated Diagram page wizard in Xerte 2 desktop

Kemp Johnathan johnathan.kemp at ntlworld.com
Fri May 28 22:07:29 BST 2010


Hello Julian and Mary,

Up till now it has been necessary to edit the rlm files that are used by the
page templates project wide template in order to make them usable in page
wizards.

The key issues were in the script named "getPageId" which contains the lines

myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() -
pgOffset]);
pageIcon.templateData = myXML.toObject();
rootIcon.setTitleText(templateData.learningObject[0].name);

The first two lines above told the rest of the code where to find the xml
data.
The solution that you suggested to me at the time Julian was to comment out
the first two lines and replace them with

pageIcon.templateData = pageIcon.extXML.toObject();

This had the side effect that all lines in the rlm file that referred to the
template data e.g.

col = pageIcon.templateData.annotatedDiagram[0].colour;

had to be modified by inserting "learningObject[0]" e.g.

col = pageIcon.templateData.learningObject[0].annotatedDiagram[0].colour;

Julian if I understand you correctly you are now suggesting that instead of
using the above I should replace the first two lines with

pageIcon.templateData = pageIcon.templateData.learningObject[0];

I have tried this out by
1. create a new folder to hold the wizard files for a page
2. save to this folder an xml and xwd file from another page created using
the annotated page wizard
3. Insert into the project a model - your new Annotated Page rlm file
4. Set the page template property to point to the folder created in 1 above.
5. Edited the getPageID script to comment out the two lines discussed above
and to add a new line "pageIcon.templateData =
pageIcon.templateData.learningObject[0];"

It appears to work, in that there is no need to modify any other lines that
reference templateData.

Note the issue of pageTitle remains as the page title still needs to be set
as a property of the page, so that it is picked up by the TOC and the page
header display.

Not having to insert learningObject[0] into new models would save me a lot
of time when creating new wizards, also editing the current wizards to use
this format would make them easier to maintain when incorporating changes to
the standard models.

I am working on page wizards to incorporate the changes you have made to
Annotated Diagram and DragDropLabel. I will try out the new way of defining
pageIcon.templateData and see how things work out. In the event of any
maintenance work needed on any of the existing page wizards I will then move
them to the new approach - assuming all works as expected.

There is still some work to be done on the DragDropLabel as your model does
not display the feedback in the event of an incorrect drop, but I am working
on it.

Kind regards

Johnathan

On 27 May 2010 20:43, Julian Tenney <Julian.Tenney at nottingham.ac.uk> wrote:

>  I think if Jonathan switched
>
> pageIcon.templateData = pageIcon.templateData.learningObject[0];
>
> somewhere near the top of his files, they ought to be interchangeable?
>
> ------------------------------
> *From:* xerte-bounces at lists.nottingham.ac.uk on behalf of Mary Ann Ahearn
> *Sent:* Thu 27/05/2010 19:57
> *To:* Xerte discussion list
> *Subject:* RE: [Xerte] Annotated Diagram page wizard in Xerte 2 desktop
>
> Figured it out!
>
> You need to go through the model file and substitute:
>
>       pageIcon.templateData.learningObject[0].annotatedDiagram[0]
>
> for every instance of
>
>       pageIcon.templateData.annotatedDiagram[0]
>
> And it works like a charm.
>
> Thanks again for the improvement to the template.
> ma
>
>
> At 12:00 PM 5/27/2010 -0400, you wrote:
>
> Thanks so much for the new models, Julian.
>
> I must be doing something drastically wrong in trying to use them.
>
> I have substituted each model file you sent, slightly renamed to match the
> old rlm file, in the xcp file that lives in my Xerte Program Files wizards
> Interactivity folder.
>
> Next, I opened Xerte and added the AnnotatedDiagram Page Template with the
> proper file structure like I always do.
>
> The wizard opens and I build my AnnotatedDiagram page with no problem.
>
> When I go to run it, all I get is a blank panel!
>
> This also happened with the first set of updated model files you sent
> several day ago.
>
> If I close Xerte, put the old rlm file back, and re-build an
> AnnotatedDiagram page all is fine.
>
> Does this make any sense?  I'm baffled.  Haven't been able to test the new
> models because I'm getting nothing.
>
> Duh
>
> Thanks
> ma
>
>
> At 09:33 AM 5/27/2010 +0100, you wrote:
>
> Thanks – that’s well spotted, and thanks for the info on how to fix it, new
> models attached,
>
> *From:* xerte-bounces at lists.nottingham.ac.uk [
> mailto:xerte-bounces at lists.nottingham.ac.uk<xerte-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Kemp Johnathan
> *Sent:* 26 May 2010 15:56
> *To:* Xerte discussion list
> *Subject:* Re: [Xerte] Annotated Diagram page wizard in Xerte 2 desktop
>
> Hello Julian,
>
> Thanks for the updated models, I took a quick look at them with a view to
> updating the page wizards.
>
> Annotated diagram
> The new model fails to show the descriptive text for a hotspot group unless
> an ordinary hotspot has first been
> actioned so that the yellow text area has been displayed.
>
> This appears to be because in the original model the text icon named
> "information" was not a child of the
> clickHandler, but was outside of the protoLabel and protoGroupLabel icon
> structure, so that it could be referenced
> both by a single annotation or a group annotation.
>
> By bringing it inside the protoLabel structure it is not displayed until a
> standard hotspot has been used. In an example where all the hotspots are
> contained in hotspot groups no descriptive text will ever be displayed.
>
> Drag drop label
> Colour highlighting of hotspots is no longer registering - hotspots are now
> boxed in black rather than yellow, so do not show up well, and when a label
> is dragged onto the wrong location no error message is displayed (Try again
> use to be displayed)
>
> Kind regards
>
> Johnathan
>
> On 24 May 2010 10:43, Julian Tenney < Julian.Tenney at nottingham.ac.uk>
> wrote:
> Replace your models with the attached: let me know if there are any
> problems,
>
> J
>
> *From:* xerte-bounces at lists.nottingham.ac.uk [
> mailto:xerte-bounces at lists.nottingham.ac.uk<xerte-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Mary Ann Ahearn
> *Sent:* 21 May 2010 23:07
> *To:* Xerte discussion list
> *Subject:* Re: [Xerte] Annotated Diagram page wizard in Xerte 2 desktop
>
> Just tested both Annotated Diagram and Drag & Drop in the original Page
> Template project wide template, and the problem is there as well.
>
> Interesting note is that the Hot Spot page template and the Hot Spot Page
> Wizard both work correctly - scrolling the too long annotation if necessary.
>
>
> Hope this helps.
>
> Thanks
> ma
>
> At 08:47 PM 5/21/2010 +0100, you wrote:
> Mary,
>
> Have you tried creating a Xerte project based on the Page Templates project
> wide template and then duplicating the pages that are causing you the
> problem, in the corresponding page types.
>
> It would help to know if the problems exist in the original Page Templates
> code or are limited to the Page Wizard based version of the page.
>
> Kind regards
>
> Johnathan
>
> On 21 May 2010 16:21, Mary Ann Ahearn <maryann at moberg.com> wrote:
> Thank so much.
> In the meantime, I've also discovered it's the same for the Drag & Drop
> page wizard.
> BTW, Congratulations on the award!!!!  You guys are phenomenal.
> At 03:39 PM 5/21/2010 +0100, you wrote:
> Content-class: urn:content-classes:message
> Content-Type: multipart/related;
>          boundary="----_=_NextPart_001_01CAF8F3.71D6CA9B";
>          type="text/html"
> I need to fix that - bear with me,
> ------------------------------
> From: xerte-bounces at lists.nottingham.ac.uk on behalf of Mary Ann Ahearn
> Sent: Fri 21/05/2010 02:32
> To: xerte at lists.nottingham.ac.uk
> Subject: [Xerte] Annotated Diagram page wizard in Xerte 2 desktop
> I've been using the Annotated Diagram page wizard and have come upon a
> problem I can't figure out how to solve and wonder if anyone can help.
> The annotation is quite long and extends past the bottom of the text box
> and beyond the bottom of the window, even though scrolling is set to auto
> for this text icon.
> I've tried a number of workarounds to no avail.  Could it have something to
> do with the fact that no text is actually assigned on the text icon itself
> but only in the code?  Could that cause the auto scrolling option to be
> confused about how much screen height is needed and whether or not to
> scroll?
> Thanks hugely!
> ma
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100528/110f46e9/attachment.html


More information about the Xerte mailing list