event.oldText
Overview
The characters present in the TextField or TextBox before any new characters were typed for the event.
Gotchas
This property is only available during the "editing"
phase of userInput events.
This property is only available on devices, not in the Corona Simulator.
Example
local defaultField
local function textListener( event )
if ( event.phase == "editing" ) then
print ( event.oldText )
end
end
defaultField = native.newTextField( 150, 150, 180, 30 )
defaultField:addEventListener( "userInput" , textListener )
|