[Xerte] Re-using .rlm model files and extracts from template.xwd in
Xerte - in search of the best of both worlds
Johnathan Kemp
johnathan.kemp at cxstaffs.co.uk
Tue Sep 15 15:15:19 BST 2009
Hello Julian,
I just realised that my earlier response did not go to the mail list and
that you would probably prefer to keep the discussion on the list.
Since this has now moved way off the original topic about importing
graphics and preserving aspect ratios I thought it might be appropriate
to start a new thread.
I have made some progress - successfully consuming a slightly modified
title.rlm file so that in Xerte I can use the model and benefit from a
wizard based form to set the page properties, whilst still being able to
have the full power of Xerte available.
If any one else wants to try this out
1.
Create a title.xwd file from the pageTemplates xwd file -
extracting just the bit for <title> to </title> beyond the first block
that defines the menu system.
2.
Use the xwd file as a guide to create the title.xml file.
3.
Open a new Xerte project
4.
Save title.xwd and title.xml in the root of the project.
5.
File / Insert model to load the title.rlm file into Xerte (from
any xerte pageTemplate based project) - (I copy the whole models and
common folders into my new project folder)
6.
Inserting the model should create a new page in Xerte.
7.
Set the pages templateData property to FileLocation +
'title.xml' (setting the templateData property will cause Xerte to look
for a .xwd file of the same name).
8.
You will need to edit the .rlm scripts in xerte - the key change
appears to be to change
9.
//myXML = new
XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);
//pageIcon.templateData = myXML.toObject();
pageIcon.templateData = pageIcon.extXML.toObject(); // you can
then access xml file based properties with
pageIcon.templateData.title[0].propertyName
10.
Some other bits to note
11.
Each time you use the model in a page you will need a separate
xml and xwd file e.g. title1.xml and title1.xwd, title2.xml and
title2.xwd etc.
12.
The .rlm files are modified so they need saving in a different
folder to the core files stored in the models folder
13.
To get narration working I think you will need the
narrationHandler interaction which is available in any pageTemplates
based Xerte project.
14.
I have started with a simple template - I now need to see if I
can get a more compicated one - e.g. the mcq.rlm to work this way. If I
can this is definitely looks the way to go to get the best of both
worlds - Xerte + pages with Template interfaces in one environment.
It would have been elegant to have been able to create a page and call
the model by setting the pages model property to the location of the
.rlm file.
Unfortunately when you click on a page to open its interface it also
opens another Xerte window in which the model is opened. This has a
further knock on effect in that the debug window stops working, probably
because two copies of Xerte have been open at the same time.
Thanks once again for your help with this :-)
I will post again to let everyone know how things progress with the
mcq.rlm file.
Kind regards
Johnathan
Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk <http://www.cxstaffs.co.uk/>
01785 355714
________________________________
From: Julian Tenney [mailto:Julian.Tenney at nottingham.ac.uk]
Sent: 14 September 2009 16:12
To: Johnathan Kemp
Subject: RE: [Xerte] Re-sizing imported graphics and
preservingtheiraspectratio
I just tested adding a xml file to the page templateData property, and
put an accompanying .xwd in there and it worked fine.
You get PageIconID.templateData to use in your model.
You need to keep duplicate instances separate - so you use the right
data for quiz1, qui2, quiz3 etc,
Good luck. You are the first person other than me to think of this...!
From: Johnathan Kemp [mailto:johnathan.kemp at cxstaffs.co.uk]
Sent: Monday, September 14, 2009 2:28 PM
To: Julian Tenney
Subject: RE: [Xerte] Re-sizing imported graphics and
preservingtheiraspectratio
Hello Julian,
I have downloaded Xerte 3 and it looks exciting, but I am stuck in a
situation where I need to be able to offer something robust to
colleagues, and which I can support their use of. Also I need to be able
to offer them a no-programming skills needed entry level and
pageTemplates / Toolkits can do that. But at the same time I need to be
able to go beyond that when they want something that can't be done out
of the box.
It took me a while to work through the help file with Xerte 2, and then
to work through the mail list for points I could not grasp from the help
- plus requests to your good selves on the Xerte Team for when I got
really stuck - so whilst I am eager to look deeper at Xerte 3 my fear is
that it will not prove robust, lacks the minimal skills entry level, and
I would face a whole new learning curve, just when I am needing to be
able to show my colleagues a return on the time investment I have put in
to learn Xerte.
So, much as I would like to dive into a world of technical
investigations and play with Xerte 3, reality forces me at present to
restrain my curiosity and focus on Xerte 2.6 :-(
There is something you may be able to throw some more light on for me.
I noticed that pages in Xerte 2.6 have a templateData and a model
property.
This suggests to me that my earlier assumption - that a Xerte project
can only be based on one template may be wrong.
Is there a simple way to use a specific .rlm file in association with
the relevant parts of the .xwd file? e.g.
1. extract the relevant parts from the template.xwd file for the
Title Page and save this as Title.xwd
2. In Xerte set the tempateData as FileLocation + 'title.xwd'
3. In Xerte set the model as FileLocation + 'models/title.rlm'
I feel I am missing something here as I think the xwd file requires a
templateData file, so I don't know if what I am trying to do here makes
sense or not.
Am I barking up the wrong tree here or is there a way that a single
xerte project could consume several .rlm files supported by their own
xwd file? If there was it could be much quicker than reverse engineering
each model.
Kind regards
Johnathan
Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk <http://www.cxstaffs.co.uk/>
01785 355714
________________________________
From: Julian Tenney [mailto:Julian.Tenney at nottingham.ac.uk]
Sent: 14 September 2009 11:51
To: Johnathan Kemp
Subject: RE: [Xerte] Re-sizing imported graphics and
preservingtheiraspectratio
Have you checked out Xerte 3?
If you are looking for the developer's side of things, and don't think
you want to use just templates, then bear in mind that Xerte 3 has
support for accordions, tabs, lists, trees and a whole load of other
things that are a pain to build in Xerte 2.6. For example, in Xerte 3
you can build an accordion with one icon.
It is w-a-y off finished, but it is functioning, and I don't think the
underlying approach to things is going to change too much. Get things as
they stand from:
http://www.nottingham.ac.uk/xerte/downloads/setup3.0.exe
Things are quite a bit different, but quite a bit the same. It's
actionscript 3. There are no interaction icons - every icon can have
event handlers attached to it, there is no flow line, just a
hierarchical structure,
J
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: Monday, September 14, 2009 10:41 AM
To: Xerte discussion list
Subject: RE: [Xerte] Re-sizing imported graphics and
preservingtheiraspectratio
Can I suggest that when new templates are developed for pageTemplates /
on-line Toolkits that they are also made available as a xerte model -
with the script adjusted for Xerte use?
Kind regards
Johnathan
Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
<http://www.cxstaffs.co.uk/> www.cxstaffs.co.uk
01785 355714
________________________________
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 14 September 2009 10:25
To: Xerte discussion list
Subject: RE: [Xerte] Re-sizing imported graphics and preserving
theiraspectratio
My first thought is 'I thought it did that...?'
If it doesn't, it ought to be fairly easy,
You are on the right lineswith the models stuff. Those models were all
built for toolkits, so there isn't a standalone set. I'd love to see
others share models as well - maybe a page on the wiki for models that
people want to share, and example / instructions for use?
J
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: Monday, September 14, 2009 10:21 AM
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re-sizing imported graphics and preserving their
aspectratio
Just an idea I had the other day.
I looked in the Xerte archives but could not see that it had been
suggested before.
When you import a graphic, you can then do CTRL + Shift + F5 to open the
page it is on and adjust the size and position of the graphic in the
preview display.
How feasible would it be to implement that if you held the Shift key
down when resizing the graphic, that the aspect ratio was preserved?
Kind regards
Johnathan
Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
<http://www.cxstaffs.co.uk/> www.cxstaffs.co.uk
01785 355714
________________________________
This email and any files transmitted with it are confidential and are
intended solely for the use of the individual(s) or entity(s) to whom
they are addressed. All messages are monitored for virus, high risk
files and inappropriate content. As a result users should be aware that
this mail maybe accessed, read and the right is reserved to reject,
return, remove attachments or delete if considered to be inappropriate
or unsuitable. Liability cannot be accepted for any loss or damage
arising from this email (or any attachments) or from scripts or any
virus transmitted. This communication represents the originator's
personal views and opinions, which do not necessarily reflect those of
Connexions Staffordshire. If you are not the original recipient or the
person responsible for delivering the email to the intended recipient,
be advised that you have received this email in error, and that any use,
dissemination, forwarding, printing, or copying of this email is
strictly prohibited. If you received this email in error, please
immediately reply to the sender or notify postmaster at cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX
________________________________
This email and any files transmitted with it are confidential and are
intended solely for the use of the individual(s) or entity(s) to whom
they are addressed. All messages are monitored for virus, high risk
files and inappropriate content. As a result users should be aware that
this mail maybe accessed, read and the right is reserved to reject,
return, remove attachments or delete if considered to be inappropriate
or unsuitable. Liability cannot be accepted for any loss or damage
arising from this email (or any attachments) or from scripts or any
virus transmitted. This communication represents the originator's
personal views and opinions, which do not necessarily reflect those of
Connexions Staffordshire. If you are not the original recipient or the
person responsible for delivering the email to the intended recipient,
be advised that you have received this email in error, and that any use,
dissemination, forwarding, printing, or copying of this email is
strictly prohibited. If you received this email in error, please
immediately reply to the sender or notify postmaster at cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX
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.
________________________________
This email and any files transmitted with it are confidential and are
intended solely for the use of the individual(s) or entity(s) to whom
they are addressed. All messages are monitored for virus, high risk
files and inappropriate content. As a result users should be aware that
this mail maybe accessed, read and the right is reserved to reject,
return, remove attachments or delete if considered to be inappropriate
or unsuitable. Liability cannot be accepted for any loss or damage
arising from this email (or any attachments) or from scripts or any
virus transmitted. This communication represents the originator's
personal views and opinions, which do not necessarily reflect those of
Connexions Staffordshire. If you are not the original recipient or the
person responsible for delivering the email to the intended recipient,
be advised that you have received this email in error, and that any use,
dissemination, forwarding, printing, or copying of this email is
strictly prohibited. If you received this email in error, please
immediately reply to the sender or notify postmaster at cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX
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.
This email and any files transmitted with it are confidential and are intended solely for the use of the individual(s) or entity(s) to whom they are addressed. All messages are monitored for virus, high risk files and inappropriate content. As a result users should be aware that this mail maybe accessed, read and the right is reserved to reject, return, remove attachments or delete if considered to be inappropriate or unsuitable. Liability cannot be accepted for any loss or damage arising from this email (or any attachments) or from scripts or any virus transmitted.
This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Connexions Staffordshire. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately reply to the sender or notify postmaster at cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090915/207ddb34/attachment.html
More information about the Xerte
mailing list