But we can use App Player Like BlueStack for testing.
local inputWeight = native.newTextField(10,10,50,10)
inputWeight:setReturnKey("done")
inputWeight:addEventListener("userInput", function( event )
if event.phase == "submitted" then
storyboard.WeightSubmit() ---- THE MOST PROBLEMATIC
native.setKeyboardFocus(nil)
elseif event.phase == "ended" then
native.setKeyboardFocus(nil)
end
end)
The code pattern of native-textfield section is very easy. That is not a problem.
The real problem is the submit function.
You should test storyboard.WeightSubmit() in the Corona Simulator
until you sure everything is work. Because the simulator will tell you every time the error occur.
If you skip this step and go to test on Bluestack or on The real device, Debuging will be very complex and difficult. That's all. :)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น