<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you Julian,<br>
<br>
Of course I will gladly test it... :-)<br>
<br>
Now I also undestand what's happening. I was wondering where the
stylesheet was supposed to end up in the STYLES object, now I
understand.<br>
I suppose that after the test is succesfull, you'll make the .fla
available through svn.<br>
<br>
Tom <br>
<br>
<br>
Op 24-3-2011 10:22, Julian Tenney schreef:
<blockquote
cite="mid:12C67A1EEC419342AF5E59DA31562C3F02D493E112@EXCHANGE1.ad.nottingham.ac.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">Ah, I see what you mean now.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">When you load a stylesheet into
TextField.stylesheet (note the class property), all text
fields take on the new styles when the sheet loads. There’s
no need to handle the onLoad – the new styles are set
automatically.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">So, the reason we had an issue yesterday is
because if there is a stylesheet attached to a LO, I just
let it load. I didn’t handle onLoad, as there was no need
to: once the sheet had loaded the new styles would be set
for all text fields.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><br>
That’s OK, UNLESS you want to use some of those styles in
the theme. Those styles are not set when
TextField.stylesheet loads, as TextField knows nothing of
Xerte.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">So, what I did was make sure that if a stylesheet
and / or templateData were being loaded, to make sure both
had loaded before parsing the rlo file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">Then, in the parse, I do this to get the styles:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"> var temp =
this.css.getStyle('colourScheme');<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"> for (var i in
temp){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">
debug(i);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">
STYLES[i] = temp[i];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">This sets the style values on Xerte’s internal
STYLES object. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">If you load a new stylesheet at runtime, you will
also have to run that code once the sheet has loaded.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">I think you will need some help in the engine,
because that’s going to be a PITA otherwise.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">I will write a ‘loadStylesheet’ function for you
in the engine, that will set the styles and refresh the
current page. Maybe you can test it for me?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">J<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none; border-color:
rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
padding: 3pt 0cm 0cm;">
<p class="MsoNormal" style="margin-left: 36pt;"><b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US">From:</span></b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>
[<a class="moz-txt-link-freetext" href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</a>] <b>On
Behalf Of </b>Tom Reijnders<br>
<b>Sent:</b> 24 March 2011 09:10<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> [Xerte] Re: Xerte2 stylesheets<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left: 36pt;"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left: 36pt;">No... stylesheet
is ignored.<br>
<br>
Op 24-3-2011 9:59, Julian Tenney schreef: <o:p></o:p></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span
style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">I just fixed that: can you test the attached?</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left: 36pt;"><span
style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"> </span><o:p></o:p></p>
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none; padding: 3pt
0cm 0cm; border-color: -moz-use-text-color;">
<p class="MsoNormal" style="margin-left: 72pt;"><b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US">From:</span></b><span
style="font-size: 10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;" lang="EN-US"> <a moz-do-not-send="true"
href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>
[<a moz-do-not-send="true"
href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</a>]
<b>On Behalf Of </b>Tom Reijnders<br>
<b>Sent:</b> 24 March 2011 08:59<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> [Xerte] Re: Xerte2 stylesheets</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-left: 72pt;"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left: 72pt;">Thanks Julian,<br>
<br>
Are the changes in svn? I've got the following problem:<br>
<br>
1. It works in your example<br>
2. It works also in a XOT or the Page Tempates when I specify
a fixed file name for the stylesheet<br>
3. It doesn't work if I try to set the stylesheet in the
template wizerd, i.e. I add a combobox to the .xwd.<br>
<br>
I am pretty sure that the style sheet is read before the xml
templat data is loaded, but I can't find where this happens.<br>
<br>
Tom<br>
<br>
<br>
Op 23-3-2011 10:39, Julian Tenney schreef: <o:p></o:p></p>
<pre style="margin-left: 72pt;">It works now: sorry, there were some timing issues with parsing the rlo file and loading up the styles info.<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Try the attached,<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">J<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">-----Original Message-----<o:p></o:p></pre>
<pre style="margin-left: 72pt;">From: <a moz-do-not-send="true" href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a> [<a moz-do-not-send="true" href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</a>] On Behalf Of Tom Reijnders<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Sent: 23 March 2011 07:49<o:p></o:p></pre>
<pre style="margin-left: 72pt;">To: Xerte discussion list<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Subject: [Xerte] Xerte2 stylesheets<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">The Page Templates use a stylesheet calle styles.css (in the common folder).<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Some commented text in that file suggests that you can influence the <o:p></o:p></pre>
<pre style="margin-left: 72pt;">colours of the titlebar, statusbar, etc. Is that working, and if so how. <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Whatever I try, I cannot get it to do anything...<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Regards,<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Tom<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">_______________________________________________<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Xerte mailing list<o:p></o:p></pre>
<pre style="margin-left: 72pt;"><a moz-do-not-send="true" href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><o:p></o:p></pre>
<pre style="margin-left: 72pt;"><a moz-do-not-send="true" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">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.<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">This message has been checked for viruses but the contents of an attachment<o:p></o:p></pre>
<pre style="margin-left: 72pt;">may still contain software viruses which could damage your computer system:<o:p></o:p></pre>
<pre style="margin-left: 72pt;">you are advised to perform your own checks. Email communications with the<o:p></o:p></pre>
<pre style="margin-left: 72pt;">University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<p class="MsoNormal" style="margin-left: 72pt;"><br>
<br>
<br>
<o:p></o:p></p>
<pre style="margin-left: 72pt;">-- <o:p></o:p></pre>
<pre style="margin-left: 72pt;">--<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<pre style="margin-left: 72pt;">Tom Reijnders<o:p></o:p></pre>
<pre style="margin-left: 72pt;">TOR Informatica<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Chopinlaan 27<o:p></o:p></pre>
<pre style="margin-left: 72pt;">5242HM Rosmalen<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Tel: 073 5226191<o:p></o:p></pre>
<pre style="margin-left: 72pt;">Fax: 073 5226196<o:p></o:p></pre>
<pre style="margin-left: 72pt;"> <o:p></o:p></pre>
<p class="MsoNormal" style="margin-left: 36pt;"><o:p> </o:p></p>
<p style="margin-left: 36pt;">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. <o:p></o:p></p>
<p style="margin-left: 36pt;">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. <o:p></o:p></p>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;">_______________________________________________<o:p></o:p></pre>
<pre style="margin-left: 36pt;">Xerte mailing list<o:p></o:p></pre>
<pre style="margin-left: 36pt;"><a moz-do-not-send="true" href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><o:p></o:p></pre>
<pre style="margin-left: 36pt;"><a moz-do-not-send="true" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><o:p></o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;">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.<o:p></o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;">This message has been checked for viruses but the contents of an attachment<o:p></o:p></pre>
<pre style="margin-left: 36pt;">may still contain software viruses which could damage your computer system:<o:p></o:p></pre>
<pre style="margin-left: 36pt;">you are advised to perform your own checks. Email communications with the<o:p></o:p></pre>
<pre style="margin-left: 36pt;">University of Nottingham may be monitored as permitted by UK legislation.<o:p></o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;"> <o:p></o:p></pre>
<p class="MsoNormal" style="margin-left: 36pt;"><br>
<br>
<o:p></o:p></p>
<pre style="margin-left: 36pt;">-- <o:p></o:p></pre>
<pre style="margin-left: 36pt;">--<o:p></o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
<pre style="margin-left: 36pt;">Tom Reijnders<o:p></o:p></pre>
<pre style="margin-left: 36pt;">TOR Informatica<o:p></o:p></pre>
<pre style="margin-left: 36pt;">Chopinlaan 27<o:p></o:p></pre>
<pre style="margin-left: 36pt;">5242HM Rosmalen<o:p></o:p></pre>
<pre style="margin-left: 36pt;">Tel: 073 5226191<o:p></o:p></pre>
<pre style="margin-left: 36pt;">Fax: 073 5226196<o:p></o:p></pre>
<pre style="margin-left: 36pt;"><o:p> </o:p></pre>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Xerte mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a>
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.
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
</pre>
</body>
</html>