AlertDialog Event.COMPLETE

This page contains changes which are not marked for translation.

Available since: Gideros 2012.8
Value: complete
Defined by: AlertDialog


This event is dispatched when user presses any button on AlertDialog or the dialog is dismissed by any other reason.


local alertDialog ="Title", "Message", "CANCEL", "YES", "NO")

local function onComplete(event)
	print(event.buttonIndex, event.buttonText)

alertDialog:addEventListener(Event.COMPLETE, onComplete)

Event properties

buttonIndex: (number) the index of the button pressed. nil when Cancel button is pressed, 1 when 1st button is pressed and, 2 when 2nd button is pressed.
buttonText: (string) the text of the button pressed.