[Xerte] Re: desktop - text entry cursor being shy

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue Feb 26 21:27:44 GMT 2013


because when they click, they set the focus
________________________________________
From: xerte-bounces at lists.nottingham.ac.uk [xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett [d_b_burnett at hotmail.com]
Sent: 26 February 2013 21:14
To: Xerte list
Subject: [Xerte] Re: desktop - text entry cursor being shy

The cursor is definitely not there.

I think I've stumbled across it.
The interaction the text entry is attached to needs focus (or something like that).
If I attach a button with the focus code to the same INT as the text entry and trigger it programmatically, nothing.
But if I actually click the button, bingo, it sets the focus.

So after seeing some help, the user is asked to click anywhere to return to the previous screen.
That click anywhere seems to mess up the setfocus.
I added a 1 sec timer to bypass the user click and the setfocus now acts as expected.

Hmm.
I can't stop the user from randomly clicking.
Wonder why that messes up the setfocus?


________________________________
From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk
Date: Tue, 26 Feb 2013 20:55:52 +0000
Subject: [Xerte] Re: desktop - text entry cursor being shy


Maybe it’s the order in which you have the statements? On the return try setting focus before setting the text? It seems like it does have focus, but the cursor may be at the end of the string rather than the beginning (or vice versa), so maybe it’s just out of view.



Paul Swanson

Internal Business Systems Analyst

Internal Business Intelligence

Harland Financial Solutions

(800) 274-7280 Ext. 2462

Paul.Swanson at harlandfs.com



From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: Tuesday, February 26, 2013 11:45 AM
To: Xerte list
Subject: [Xerte] Re: desktop - text entry cursor being shy



Hi Paul!



Yes, I've tried all the usual concatenations plus a few variations I found in the archives.

setFocus(teicon.txt); was what I had in there originally.

No joy.





________________________________

From: Paul.Swanson at harlandfs.com<mailto:Paul.Swanson at harlandfs.com>
To: xerte at lists.nottingham.ac.uk<mailto:xerte at lists.nottingham.ac.uk>
Date: Tue, 26 Feb 2013 19:35:41 +0000
Subject: [Xerte] Re: desktop - text entry cursor being shy

I notice that when you first get to the page, you’ve got:



setFocus(teicon.txt);

teicon.txt.text = "";



But on the return you have:



teicon.txt.text = prevtext;

setFocus(teicon);



Should it be setFocus(teicon.txt); ?



Paul Swanson

Internal Business Systems Analyst

Internal Business Intelligence

Harland Financial Solutions

(800) 274-7280 Ext. 2462

Paul.Swanson at harlandfs.com<mailto:Paul.Swanson at harlandfs.com>



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: Tuesday, February 26, 2013 10:22 AM
To: Xerte list
Subject: [Xerte] desktop - text entry cursor being shy



I am setting up a text entry on a text icon:



teicon.txt.autoSize = 0;

teicon.txt._height = 26;

teicon.txt._width = 263;

//teicon.txt.border = 1;

teicon.txt.type = "input";

teicon.txt.selectable = 1;

teicon.txt.multiline = 0;

myTF = new TextFormat();

//myTF.font = "Arial";

myTF.font = "Arial Bold";

myTF.size = 16;

teicon.txt.setNewTextFormat(myTF);

setFocus(teicon.txt);

teicon.txt.text = "";





When this executes, the cursor appears as expected at index 0 and the user starts typing.



A "show answers" routine may pull the focus from that while text is being input (the cursor is in the box).



So I store the existing text and clear the box



prevtext = teicon.txt.text;

teicon.txt.text = "";



Then the user comes back from the subroutine, I set it back up:



teicon.txt.text = prevtext;

setFocus(teicon);

//Selection.setFocus(teicon); //tried this as well



Which fills the text entry back up, and even accepts keys if I start typing.

But no cursor.

I need to click the mouse back in the box to get a cursor there again.



Setting the focus puts the cursor there initially, but not the second time around.

??








_______________________________________________ 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 http://lists.nottingham.ac.uk/mailman/listinfo/xerte



More information about the Xerte mailing list