[Xerte] How to use tries limit

b b bogdanm2003 at yahoo.com
Fri Sep 28 12:24:08 BST 2007


thank you! i will try to use this.


----- Original Message ----
From: Tenney Julian <Julian.Tenney at nottingham.ac.uk>
To: Xerte discussion list <xerte at lists.nottingham.ac.uk>
Sent: Friday, September 28, 2007 2:03:09 PM
Subject: RE: [Xerte] How to use tries limit


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.
 
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.
 
So, somewhere before the interaction icon set 
 
tries = 0;
 
Add the textEnrty response, and set it's rs property to something to reference the text field, i.e. myTextEntry
 
then, in your code that checks the users answer you have something like:
 
tries++;
if (myTextEntry.text == 'correctWord'){
  //user is right
} else if (tries > 3){
  myTextEntry.text = "correctWord";
}
 
Julian
 




From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of b b
Sent: 28 September 2007 11:02
To: Xerte discussion list
Subject: Re: [Xerte] How to use tries limit


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 



----- Original Message ----
From: Tenney Julian <Julian.Tenney at nottingham.ac.uk>
To: Xerte discussion list <xerte at lists.nottingham.ac.uk>
Sent: Friday, September 28, 2007 12:55:51 PM
Subject: RE: [Xerte] How to use tries limit


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?




From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of b b
Sent: 28 September 2007 10:49
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] How to use tries limit


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?



Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. 





Pinpoint customers who are looking for what you sell.


      ____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
http://tv.yahoo.com/collections/3658 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20070928/3260435d/attachment.html


More information about the Xerte mailing list