set Event Listener
Sets an event listener for current widget, keeping the actual type of component.
Return
id of the handler
Example:
button.setEventListener<Button> {
dblclick = {
Alert.show("Button double clicked!")
// self is of type Button here
}
}
Parameters
T
widget type
block
event handler