Return key while text field selected

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
levisalarcon
Posts: 3
Joined: Sat Feb 01, 2014 8:53 pm

Return key while text field selected

Post by levisalarcon » Sat Feb 01, 2014 9:19 pm

Hi all, Im getting started with LiveCode and I have a problem with a text field, so Here I go.
when I select the text field entry the keyboard goes on, then I press the Return Key so the keyboard disappears. Everything's fine here, but the problem is that the text field is still selected, so when I click over the field again, the keyboard doesnt appear anymore.

I've tried with the returnInField handler in the text field but it seems like doesnt work.

Code: Select all

on returnInField
    focus on nothing
end returnInField
I hope you can help me.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: Return key while text field selected

Post by dunbarx » Sat Feb 01, 2014 10:17 pm

Keyboard?

Do you mean there is or is not a blinking cursor in the field? Do you really mean "the field is selected" or rather that the text in the field is selected?

Don't fret too much about communicating to us about this new world you have joined. Welcome. But I do not quite get what is happening yet. Write back...

Craig Newman

EDIT:

It might be useful for you to set out the steps you followed that made you write this post. Something like:

1- In a new mainStack make a new field.
2- Place some text in that field. (you would indeed use the keyboard for this, after setting the cursor in the field)
3- Select some text in that field
4- Press return on the keyboard,
5- Your turn...

levisalarcon
Posts: 3
Joined: Sat Feb 01, 2014 8:53 pm

Re: Return key while text field selected

Post by levisalarcon » Sat Feb 01, 2014 10:45 pm

Sorry if I wasn't clear. The problem is really simple:

I have a text field entry in a Card and Im testing it in my android phone. When I click over the field (There is no text in the field) the android keyboard appears, then I push the return key to hide the keyboard and it works (the keyboard turns off), but the cursor keeps blinking in the field so I can not open the keyboard by clicking the field again.

dunbarx wrote: EDIT:

It might be useful for you to set out the steps you followed that made you write this post. Something like:

1- In a new mainStack make a new field.
2- Place some text in that field. (you would indeed use the keyboard for this, after setting the cursor in the field)
3- Select some text in that field
4- Press return on the keyboard,
5- Your turn...
1. In a new MainStack make a new field.
2. Set the cursor in the field.
3. Press return on the keyboard.
4. The cursor is still blinking in the field.
5. Click over the field
6. The keyboard doesn't go on. :(

Thanks for your reply!
Last edited by levisalarcon on Sat Feb 01, 2014 11:06 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: Return key while text field selected

Post by dunbarx » Sat Feb 01, 2014 11:01 pm

Ah.

I am a desktop guy. I keep forgetting that there is a new world out there that LC is immersed in. You will hear from someone soon who will know what you need.

Craig

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Return key while text field selected

Post by Simon » Sun Feb 02, 2014 1:28 am

Hi levisalarcon,
Try using a native text field. Here is the lesson;
http://lessons.runrev.com/s/lessons/m/4 ... -on-mobile
It's a bit over-the-top as there are only about 3 of the commands you need (create/do/delete).
While the cursor does remain after you hit Enter/Done, testing here on android the keyboard does come back up when touched again.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

levisalarcon
Posts: 3
Joined: Sat Feb 01, 2014 8:53 pm

Re: Return key while text field selected

Post by levisalarcon » Sun Feb 02, 2014 2:20 am

It works! Thank you so much.

Post Reply