[Xerte] Re: Desktop - default action key for text entry?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Feb 11 10:39:18 GMT 2013


Ah, sorry. You can't stop the flow at the text icon, I think you'll have to use some sort of structure to pause the flow (i.e. an interaction, even if you don't use its responses and just call exit() to move past it when you're done.)

IN the engine, to handle text entries on the te response, it's done through

textField.onKeyDown = function(){
  if(Key.isDown(Key.ENTER){
    //bingo
  }
}

Could you set a script function to handle it that way? i.e.

icontextentry.txt.onKeyDown = yourScriptFunctionName

?

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 11 February 2013 10:32
To: Xerte list
Subject: [Xerte] Re: Desktop - default action key for text entry?


I'm not using the standard TE.
It's a text field
icontextentry.txt.multiline = 0;
etc


________________________________
From: Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>
To: xerte at lists.nottingham.ac.uk<mailto:xerte at lists.nottingham.ac.uk>
Date: Mon, 11 Feb 2013 10:25:55 +0000
Subject: [Xerte] Re: Desktop - default action key for text entry?
Set the phrase to '*', then enter trips the response. You can then use code in the response to check the users input and if you want to go round again, you can prompt them otherwise int.exit()

From: xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 11 February 2013 10:24
To: Xerte list
Subject: [Xerte] Re: Desktop - default action key for text entry?

Yes.
I ended up with an off screen button that I onRelease after trapping the ENTER key.

________________________________
From: Julian.Tenney at nottingham.ac.uk<mailto:Julian.Tenney at nottingham.ac.uk>
To: xerte at lists.nottingham.ac.uk<mailto:xerte at lists.nottingham.ac.uk>
Date: Mon, 11 Feb 2013 09:48:38 +0000
Subject: [Xerte] Re: Desktop - default action key for text entry?
Step back a bit - what are you trying to do? Trip a textEntry response on the enter key?

From: xerte-bounces at lists.nottingham.ac.uk<mailto:xerte-bounces at lists.nottingham.ac.uk> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 10 February 2013 17:02
To: Xerte list
Subject: [Xerte] Desktop - default action key for text entry?


Did the engine ever get this added?
I saw a hint of it in the archives, but nothing definitive.

Or some way to trip and interaction without taking the focus away.

I set up a textinput in a text icon:

icontextentry.txt._height = 20;
icontextentry.txt._width = 300;
icontextentry.txt.background = true;
icontextentry.txt.border = true;
icontextentry.txt.type = 'input';
icontextentry.txt.selectable = true;
icontextentry.txt.maxChars = 40;
icontextentry.txt.multiline = 0;
myTF = new TextFormat();
myTF.font = "Verdana";
myTF.size = 14;
icontextentry.txt.setNewTextFormat(myTF);
setFocus(icontextentry.txt);


Now how do I stop the flow until Enter is pressed?

Evaluating keys is no good as it pulls focus from the text input. :-/







_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk<mailto:Xerte at lists.nottingham.ac.uk> http://lists.nottingham.ac.uk/mailman/listinfo/xerte




_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk<mailto:Xerte at lists.nottingham.ac.uk> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20130211/d70b4d55/attachment-0001.html>


More information about the Xerte mailing list