Allowing user to input number through text field or other method

Hi,

I’m creating a basic app and want the user to be able to essentially input a number between 1 and 40 that will “decrease” a timer by 1-40% the next time the user presses another button.  Obviously the math/code for the decrease is quite simple.

But I’m not sure how to “get” the number from a native text field or another method (such as a scroll wheel or bar that would go from 0-40, etc.).  Any ideas?

Daniel,

I think you are looking for http://docs.coronalabs.com/api/library/widget/index.html Corona Widgets :slight_smile:

In any case most if not all widgets have a touch event or listenter, like onPress etc. which you can determine what to do with the action etc.

With regards to native text field I believe you are looking for the object.text parameter.

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

Daniel,

I think you are looking for http://docs.coronalabs.com/api/library/widget/index.html Corona Widgets :slight_smile:

In any case most if not all widgets have a touch event or listenter, like onPress etc. which you can determine what to do with the action etc.

With regards to native text field I believe you are looking for the object.text parameter.

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