A simple text box input using Corona SDK Simulator

All of my work is done in the simulator. I’m working on a group project.  Telling me it doesn’t work in the simulator is telling me I can continue my work.  This is REALLY frustrating.

I remember Rob saying that it is some Windows’ limitations which make native inputs unavailable in Corona simulator. If so then it is not lack of feature but characteristics of environment and probably one for which workaround is difficult.

Hi Jedi,

I’ve read numerous posts about this topic.  I really don’t care if a FIX is difficult or not.  If corona wants a quality product that will take over the industry they need to provide BASIC functionality.  Simulating textboxes in s BASIC functionality.

People have been writing keyboard intercept code since dawn of MSDOS.  I’ve written keyboard intercept code. 

Like I said earlier.  Instead of doing all the fun new stuff with Graphics 2.0 they should have been providing this BASIC functionality.

All I’ve been hearing from Corona on this issue is excuses.

Please don’t take my negative tone as indication of disdain for Corona.  I really like Corona.  That’s why I find it so amazing they have fallen down so hard on this issue.

IMHO they need a swat team to address this issue yesterday.

Regards,

Arthur

Agree that lack of native text box support makes life quite difficult on the Windows simulator. 

In some cases I have resorted to this: 

-- Determine if running on Simulator isSimulator = "simulator" == system.getInfo("environment") if system.getInfo( "platformName" ) == "Mac OS X" then isSimulator = false; end if (isSimulator) then textField1 = "something" textField2 = "somewhere" functionCall(textField1, textField2) else -- real device textField1 = \<from native field\> textField2 = \<from native field\> functionCall(textField1, textField2) end ...

This works if its only about consuming the text fields. Still don’t have a to implement text input events.

Thanks anshuman100 !

That is an awesome workaround.

Regards,

Arthur

Cheers.

Also, for things you must test on the device, the quickest way I have found to move the APK to the device is via Airdroid App - once started you can access its interface on your laptop browser, which makes it easy to move the compiled APK to the mobile. The transfer is a matter of seconds, and then you can open the APK on the mobile using any file manager and you have your App ported on the mobile. 

Ironically, in this whole process, it takes more time to compile the app and generate the APK than to port and install.

Hi anshuman100,

Unfortunately the code above doesn’t work for the windows simulator in turns of putting the text in the box.  All you get is a grey box which does not suit my needs for testing.

Thanks anyway

Arthur

Hi Arthur, 

I should have made this clear, you will not see the real workable box and it will be greyed out. However, once you hit the login/submit/DoSomething button, in the action listener of that button, you can do the isSimulator check and use dummy values if its a simulator. This way you get to test the form and buttons and actions in the simulator. 

When it comes down to testing the actual fields, porting it on a device is the final sprint. 

Cheers,

Anshuman

All of my work is done in the simulator. I’m working on a group project.  Telling me it doesn’t work in the simulator is telling me I can continue my work.  This is REALLY frustrating.

I remember Rob saying that it is some Windows’ limitations which make native inputs unavailable in Corona simulator. If so then it is not lack of feature but characteristics of environment and probably one for which workaround is difficult.

Hi Jedi,

I’ve read numerous posts about this topic.  I really don’t care if a FIX is difficult or not.  If corona wants a quality product that will take over the industry they need to provide BASIC functionality.  Simulating textboxes in s BASIC functionality.

People have been writing keyboard intercept code since dawn of MSDOS.  I’ve written keyboard intercept code. 

Like I said earlier.  Instead of doing all the fun new stuff with Graphics 2.0 they should have been providing this BASIC functionality.

All I’ve been hearing from Corona on this issue is excuses.

Please don’t take my negative tone as indication of disdain for Corona.  I really like Corona.  That’s why I find it so amazing they have fallen down so hard on this issue.

IMHO they need a swat team to address this issue yesterday.

Regards,

Arthur

Agree that lack of native text box support makes life quite difficult on the Windows simulator. 

In some cases I have resorted to this: 

-- Determine if running on Simulator isSimulator = "simulator" == system.getInfo("environment") if system.getInfo( "platformName" ) == "Mac OS X" then isSimulator = false; end if (isSimulator) then textField1 = "something" textField2 = "somewhere" functionCall(textField1, textField2) else -- real device textField1 = \<from native field\> textField2 = \<from native field\> functionCall(textField1, textField2) end ...

This works if its only about consuming the text fields. Still don’t have a to implement text input events.

Thanks anshuman100 !

That is an awesome workaround.

Regards,

Arthur

Cheers.

Also, for things you must test on the device, the quickest way I have found to move the APK to the device is via Airdroid App - once started you can access its interface on your laptop browser, which makes it easy to move the compiled APK to the mobile. The transfer is a matter of seconds, and then you can open the APK on the mobile using any file manager and you have your App ported on the mobile. 

Ironically, in this whole process, it takes more time to compile the app and generate the APK than to port and install.

Hi anshuman100,

Unfortunately the code above doesn’t work for the windows simulator in turns of putting the text in the box.  All you get is a grey box which does not suit my needs for testing.

Thanks anyway

Arthur

Hi Arthur, 

I should have made this clear, you will not see the real workable box and it will be greyed out. However, once you hit the login/submit/DoSomething button, in the action listener of that button, you can do the isSimulator check and use dummy values if its a simulator. This way you get to test the form and buttons and actions in the simulator. 

When it comes down to testing the actual fields, porting it on a device is the final sprint. 

Cheers,

Anshuman