<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.6000.16525" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>In the first usage, there is no way to know whether a
number of tries has been reached, as Xerte keeps looking for a mtached phrase
after each keypress. The interaction doesn't increment tries for each keypress
as this doesn't make sense - you only want tries to increment each time the user
submits a word. As users don't submit a word in the first approach, tries won't
work as you want. You need to use the second usage.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>In the second usage you can do it: set the phrase to * and
then the match happens each time enter is pressed, and your code runs to
check the user's answer.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>So, somewhere before the interaction icon set
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>tries = 0;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>Add the textEnrty response, and set it's rs property to
something to reference the text field, i.e. myTextEntry</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>then, in your code that checks the users answer you have
something like:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><SPAN
class=508415410-28092007><FONT face=Verdana color=#0000ff
size=2>tries++;</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>if (myTextEntry.text == 'correctWord'){</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2> //user is right</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2>} else </FONT></SPAN><FONT face=Verdana><FONT size=2><FONT
color=#0000ff><SPAN class=508415410-28092007>if (tries >
3){</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana><FONT size=2><FONT
color=#0000ff><SPAN class=508415410-28092007> myTextEntry.text =
"correctWord";</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana><FONT size=2><FONT
color=#0000ff><SPAN class=508415410-28092007>}</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Verdana><FONT size=2><FONT
color=#0000ff><SPAN
class=508415410-28092007></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Verdana><FONT size=2><FONT
color=#0000ff><SPAN
class=508415410-28092007>Julian</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=508415410-28092007><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>b
b<BR><B>Sent:</B> 28 September 2007 11:02<BR><B>To:</B> Xerte discussion
list<BR><B>Subject:</B> Re: [Xerte] How to use tries
limit<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">in
firts exercise i'm using it with phrase set to the word to match,and in second
exercise i have a big text with more than one text entry for a phrase
so i have to check it with my own code
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR><BR>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">-----
Original Message ----<BR>From: Tenney Julian
<Julian.Tenney@nottingham.ac.uk><BR>To: Xerte discussion list
<xerte@lists.nottingham.ac.uk><BR>Sent: Friday, September 28, 2007
12:55:51 PM<BR>Subject: RE: [Xerte] How to use tries limit<BR><BR>
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<DIV dir=ltr align=left><SPAN class=265395409-28092007><FONT face=Verdana
color=#0000ff size=2>It depends how you are using the textEntry. Are you using
it with phrase set to the word you want to match? Or are you using it with
phrase set to * and you do the checking with your own
code?</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>b
b<BR><B>Sent:</B> 28 September 2007 10:49<BR><B>To:</B>
xerte@lists.nottingham.ac.uk<BR><B>Subject:</B> [Xerte] How to use tries
limit<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>hi.I have a text entry and i want after 3 incorrect tries to show the
correct answer.How can i use the tries limit to do that?</DIV></DIV><BR>
<HR SIZE=1>
Tonight's top picks. What will you watch tonight? <A
href="http://us.rd.yahoo.com/tv/mail/tagline/tonightspicks/evt=48220/*http://tv.yahoo.com/"
target=_blank rel=nofollow>Preview the hottest shows</A> on Yahoo! TV.
</BLOCKQUOTE></DIV><BR></DIV></DIV><BR>
<HR SIZE=1>
<A
href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint
customers </A>who are looking for what you sell. </BLOCKQUOTE></BODY></HTML>