[Xerte] How to use tries limit

Tenney Julian Julian.Tenney at nottingham.ac.uk
Fri Sep 28 12:03:09 BST 2007


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
<http://us.rd.yahoo.com/tv/mail/tagline/tonightspicks/evt=48220/*http://
tv.yahoo.com/>  on Yahoo! TV. 



________________________________

	Pinpoint customers
<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> who
are looking for what you sell. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20070928/dcb30846/attachment.html


More information about the Xerte mailing list