No, because when I send code examples I always try to attach the minimal amount of code needed to reproduce the issue. This is mainly to make it easier for you. God knows I’ve been on your side of the table enough times to appreciate simple examples… 
The mention of simulator etc was only to provide you with the reason why I needed to populate and read the contents of a native.newTextField in the first place.
But, sure, I can attach a more complete example:
local inSimulator = false if (system.getInfo("environment") == "simulator") then inSimulator = true end local editField = native.newTextField(display.contentWidth/2, 100, 200, 35) local function onPressMeTouch(e) if (e.phase == "began") then if (inSimulator) then print("In simulator - add dummy value to editField to be able to go on") editField.text = "123456" end -- Check if editField is populated if (string.len(editField.text) == 0) then native.showAlert("Error!", "Field must be populated!", {"Alright"}) end end end local pressMe = display.newText("PRESS ME!", display.contentWidth/2, 300, native.systemFont, 32) pressMe:addEventListener("touch", onPressMeTouch)
When the user presses the PRESS ME! label, a check is done to see if editField is populated and an alert is issued if it’s not.
To get past this in the simulator (where in Windows editField cannot be edited), I try to populate it with a dummy value before the population test.
That’s all there is to it. In the simulator I still get the alert. On an actual devide, the code works as expected.