Page 1 of 1

Return key while text field selected

Posted: Sat Feb 01, 2014 9:19 pm
by levisalarcon
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.

Re: Return key while text field selected

Posted: Sat Feb 01, 2014 10:17 pm
by dunbarx
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...

Re: Return key while text field selected

Posted: Sat Feb 01, 2014 10:45 pm
by levisalarcon
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!

Re: Return key while text field selected

Posted: Sat Feb 01, 2014 11:01 pm
by dunbarx
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

Re: Return key while text field selected

Posted: Sun Feb 02, 2014 1:28 am
by Simon
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

Re: Return key while text field selected

Posted: Sun Feb 02, 2014 2:20 am
by levisalarcon
It works! Thank you so much.