Help! User text entry with validation - Question and answer game

Hi guys, 

Basically I’m writing a small game for mobiles (android), it asks the user a question and the user somehow submits an answer. I’d really like this to be through the use of the local devices keyboard but not even sure where to begin with the code. If anyone has any snippets, or would like to give me a little helpful tuition I’d be forever grateful! Thanking you!

  • Syntax

I would start with this documentation:

http://docs.coronalabs.com/api/library/native/newTextField.html

Also see the sample app in:  CoronaSDK/SampleCode/Interface/NativeKeyboard2/

If you need to parse what they type, you will need to become familiar with the string.* library and of course you need to display your text, so you need to know about display.newText()

http://docs.coronalabs.com/api/library/string/index.html

http://docs.coronalabs.com/api/library/display/index.html

That should get you started.

Hi Rob, 

That all looks great! Thank you for going through the effort, really appreciate some documentation to look through for the chance to understand as well as get things working. Will have a look through and see what I can pull from it. 

Thanks again, 

M

I would start with this documentation:

http://docs.coronalabs.com/api/library/native/newTextField.html

Also see the sample app in:  CoronaSDK/SampleCode/Interface/NativeKeyboard2/

If you need to parse what they type, you will need to become familiar with the string.* library and of course you need to display your text, so you need to know about display.newText()

http://docs.coronalabs.com/api/library/string/index.html

http://docs.coronalabs.com/api/library/display/index.html

That should get you started.

Hi Rob, 

That all looks great! Thank you for going through the effort, really appreciate some documentation to look through for the chance to understand as well as get things working. Will have a look through and see what I can pull from it. 

Thanks again, 

M