<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<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:Verdana;
        panose-1:2 11 6 4 3 5 4 4 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";}
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";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.emailstyle18
        {mso-style-name:emailstyle18;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.emailstyle19
        {mso-style-name:emailstyle19;
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
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 Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Great idea. But it doesn&#8217;t fire until AFTER the textfield loses
focus, so it&#8217;s no good.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Saturday, January 09, 2010 9:59 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Inserting Special Characters<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<div id=idOWAReplyText11949>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>onKillFocus.
Great idea - thanks.</span><span lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

</div>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk on behalf of Paul Swanson<br>
<b>Sent:</b> Fri 08/01/2010 16:05<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Inserting Special Characters</span><span
lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Shouldn&#8217;t
that be onChange, rather than onChange<b><i>d</i></b>? Maybe getting the TF
onKillFocus would be a better choice?</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Paul</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Friday, January 08, 2010 7:53 AM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Inserting Special Characters</span><span
lang=EN-US><o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Exactly my thinking:</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>INTERFACE.prototype.trackTextFields
= function(){</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.onSetFocus = function(){</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
delete this.currentTF.onChanged;</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.currentTF = Selection.getFocus();</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
debug(&quot;got &quot; + this.currentTF);</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.currentTF.onChanged = function(tf){</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
debug(&quot;CHANGED&quot;);</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Selection.addListener(this);</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>}</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>So I enable it by calling
rootIcon.trackTextFields; I see the debug as the focus changes, but I am not
seeing the change handler fire &#8211; WTF? I need to know the current TF AND the
position of the caret, so that when I click my special char insert button, I
know where to put it.</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:72.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Dave Burnett<br>
<b>Sent:</b> Friday, January 08, 2010 3:51 PM<br>
<b>To:</b> Xerte list<br>
<b>Subject:</b> RE: [Xerte] Inserting Special Characters</span><span
lang=EN-US><o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><span lang=EN-US>&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:72.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Maybe
a global func that holds the tf id of the last tf with focus?<br>
<br>
&lt;pseudo&gt;<br>
if object with focus=TF {<br>
last_active = TF ID<br>
}<br>
&lt;/pseudo&gt;<br>
<br>
<br>
&gt; Date: Fri, 8 Jan 2010 15:27:12 +0000<br>
&gt; From: Julian.Tenney@nottingham.ac.uk<br>
&gt; To: xerte@lists.nottingham.ac.uk<br>
&gt; Subject: [Xerte] Inserting Special Characters<br>
&gt; <br>
&gt; I want to have anumber of buttons insert special characters into a<br>
&gt; textfield. How can I get the textfield that is currently selected when I<br>
&gt; click a button?<br>
&gt; <br>
&gt; If I debug (Selection.getFocus()) after clicking the button, I get - of<br>
&gt; course - the button, as I just selected it by clicking it. How can I<br>
&gt; know the textField that has / did have the caret in it, and the position<br>
&gt; of the caret?<br>
&gt; <br>
&gt; Previously I've done this by having the textfield update some variables<br>
&gt; onChange, but this isn't an option in this case.<br>
&gt; <br>
&gt; J<br>
&gt; _______________________________________________<br>
&gt; Xerte mailing list<br>
&gt; Xerte@lists.nottingham.ac.uk<br>
&gt; http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span><span
lang=EN-US><o:p></o:p></span></p>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>

<hr size=2 width="100%" align=center>

</span></div>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Hotmail: Trusted email with Microsoft&#8217;s
powerful SPAM protection. <a
href="http://clk.atdmt.com/GBL/go/196390706/direct/01/" target="_new">Sign up
now.</a></span><span lang=EN-US><o:p></o:p></span></p>

</div>

</div>

</div>

</body>

</html>