A simple text box input using Corona SDK Simulator

Hi All!
I am very new to this world made of Lua and Corona, and I found it really exciting. I was trying to create a very simple Hello World application where I input my name into a textfield and the app should say something like "Hello " + MY NAME

Ok?

I tried to use this to create a text box:

defaultField = native.newTextField( 10, 30, 180, 30,
fieldHandler( function() return defaultField end ) )

But the simulator says: “WARNING: Native text fields are not currently supported in the simulator. Please build for device.”

Ehmmm… What’s that? I mean, I just need a very simple text box for input my name… What if I have to develop a more complex app that crunches some input and I need to debug it? Please tell me I am doing something wrong!

[import]uid: 86439 topic_id: 21772 reply_id: 321772[/import]

It means the simulator cannot show you the results of the code, you will need to build the app and run the tests on your device, unless using iOS then you can use the Xcode simulator instead. [import]uid: 100222 topic_id: 21772 reply_id: 86464[/import]

If you want to create a simple text box for name input use this :

http://developer.anscamobile.com/reference/index/nativenewtextfield

It’s supported in the simulator also :slight_smile: [import]uid: 84637 topic_id: 21772 reply_id: 86471[/import]

It doesn’t work for me in the simulator. [import]uid: 100222 topic_id: 21772 reply_id: 86475[/import]

try the sample code in this link http://developer.anscamobile.com/reference/index/nativenewtextfield
and get the latest version of the corona sdk. I assure you it works :slight_smile:

(I linked to the incorrect thing before, my appologies) [import]uid: 84637 topic_id: 21772 reply_id: 86477[/import]

download .746 and tried again with the short example in the new link.

Native text fields not supported on simulator

Tried with larger code example

Native text fields not supported on simulator and listener argument to native newTextField is deprecated.

[import]uid: 100222 topic_id: 21772 reply_id: 86484[/import]

Are you on windows or mac? [import]uid: 84637 topic_id: 21772 reply_id: 86494[/import]

Windows [import]uid: 100222 topic_id: 21772 reply_id: 86505[/import]

Windows doesn’t support textFields in the simulator at the current time.

You would want to either use a Mac if you have one handy or build for device to test. [import]uid: 52491 topic_id: 21772 reply_id: 86568[/import]

Isn’t that what I said in post 2 ;o) [import]uid: 100222 topic_id: 21772 reply_id: 86581[/import]

Hey Jeff, sorry that was my fault. I presumed you were on a mac. I will talk with the team to see where things stand with getting support for this on the Windows version [import]uid: 84637 topic_id: 21772 reply_id: 86594[/import]

Hi All!
Thanks Danny for the quick response.
I realize maybe I was not really clear in my first message. I did use native.newTextField and it just didn’t work, now I understand why, I use the Windows Simulator.

I don’t own a Mac, so I can’t test it directly. Ok, good to know.

One thing that scares the hell out of me about Corona is that I don’t see support for standard and very simple interface objects like: check boxes, drop down lists, and so on…

I see labels (that work), I see text fields (that work only on Mac), but nothing more. Sometimes games need an option page where you can set parameters, especially if the game is not as simple as PacMan… (you know what I mean!).

So, my question is plain and simple: where are checkboxes and other interface objects? It might sound weird, but this is a match point for us (as a Software Company).

Corona is the best cross-platform tool to develop games that I’ve seen so far.
[import]uid: 86439 topic_id: 21772 reply_id: 86595[/import]

Hi vortika.

I understand your concerns, and all i can say for now (more info soon) is that you guys are going to get a lot of features you have been requesting for a while now, rolling out in the near future.

I will post more details when I can (too early to say right now) [import]uid: 84637 topic_id: 21772 reply_id: 86596[/import]

Apologies if I am bumping an old thread but I am also very interested in any updates that have been made on this in the past couple months. I have a project that requires the use of a dropdown and many text boxes.

My company only uses Windows PCs - if Corona is not viable for creating this simple app, I have no problem having our team use another SDK for this project and similar future projects.

Please advise. [import]uid: 130180 topic_id: 21772 reply_id: 98161[/import]

I am also using windows and need a method for entering text into a textbox and need to be able to test on the simulator.
So any progress on this would be appreciated.
[import]uid: 67842 topic_id: 21772 reply_id: 110036[/import]

I would echo the other comments in this thread. Not being able to view text boxes in the simulator on Windows is a huge deficit. I understand you can build and view on the device, but that’s obviously a little more time consumming when you are trying to line things up, etc… Also, I have a need to put check boxes on an app (which will give me a value for a yes/no field in SQL lite), and can’t determine if that ability is there or not ?

Thanks
Chris [import]uid: 143025 topic_id: 21772 reply_id: 113903[/import]

if we cant use textboxes in windows then how do we accpet and store playername :frowning: [import]uid: 171958 topic_id: 21772 reply_id: 131692[/import]

if we cant use textboxes in windows then how do we accpet and store playername :frowning: [import]uid: 171958 topic_id: 21772 reply_id: 131692[/import]

You can use them on device just not in the windows simulator :slight_smile: [import]uid: 52491 topic_id: 21772 reply_id: 131831[/import]

You can use them on device just not in the windows simulator :slight_smile: [import]uid: 52491 topic_id: 21772 reply_id: 131831[/import]