I wonder is it possible to embed an input form via corona ge?
[import]uid: 10373 topic_id: 3669 reply_id: 303669[/import]
found it finally!
[code]
– Handlers for login dialog UI
local function onUsername( event )
if ( “began” == event.phase ) then
– Note: this is the “keyboard appearing” event
– In some cases you may want to adjust the interface while the keyboard is open.
elseif ( “submitted” == event.phase ) then
– Automatically tab to password field if user clicks “Return” on iPhone keyboard (convenient!)
native.setKeyboardFocus( passwordField )
end
end
local function onPassword( event )
– Hide keyboard when the user clicks “Return” in this field
if ( “submitted” == event.phase ) then
native.setKeyboardFocus( nil )
end
end
usernameField = native.newTextField( 50, 150, 220, 36, onUsername )
usernameField.font = native.newFont( native.systemFontBold, 24 )
usernameField.text = “”
usernameField:setTextColor( 51, 51, 122, 255 )
passwordField = native.newTextField( 50, 210, 220, 36, onPassword )
passwordField.font = native.newFont( native.systemFontBold, 24 )
passwordField.text = “”
passwordField.isSecure = true
passwordField:setTextColor( 51, 51, 122, 255 )
[/code] [import]uid: 10373 topic_id: 3669 reply_id: 11188[/import]
hit error on the log file
Copyright (C) 2009-2010 A n s c a , I n c .
Version: 1.0.0
Build: 2010.109
The file sandbox for this project is located at the following folder:
(/Users/admin/Library/Application Support/Corona Simulator/CoffeeDemo-C2A3DE8306CA6962BDD32F0CEB59F8CA)
WARNING: Native text fields are not currently supported in the simulator. Please build for device.
my code in main.lua
numericField = native.newTextField( 50, 150, 220, 36, handlerFunction )
numericField.inputType = "number"
[import]uid: 10373 topic_id: 3669 reply_id: 11238[/import]
the problem is stated in the error!
WARNING: Native text fields are not currently supported in the simulator. Please build for device. [import]uid: 6645 topic_id: 3669 reply_id: 12124[/import]