I have developed my first game in corona simulator. I am wondering why the newtextfile object has different behavoir during the simulation than during device execution.
The code has a newtextfile to indicate the number of players. I want this box to have a default value, so:
NumPlayersField = native.newTextField(display.contentCenterX+100, display.contentCenterY+10, 35, 35 ) NumPlayersField.inputType = "number" --Default value NumPlayersField.text = "4" NumPlayers=tonumber(NumPlayersField.text) composer.setVariable("NumPlayers",NumPlayers)