event.numDeleted

Type Number
Event userInput
Revision Current Public Release (2017.3068)
Keywords userInput, numDeleted

Overview

The number of characters which were deleted.

Gotchas

This property is only available during the "editing" phase of userInput events.

Example

local defaultField

local function textListener( event )
    if ( event.phase == "editing" ) then
        print( event.numDeleted )
    end
end

defaultField = native.newTextField( 150, 150, 180, 30 )
defaultField:addEventListener( "userInput", textListener )