Gambas Documentation - /lang/last

/lang/last

# LAST

LAST

Returns a reference to the object that raised the last event.

### Examples

    DIM hButton[3] AS Button

    hButton[0] = NEW Button(ME) AS "MyButtons"
    hButton[0].Text = "Red";

    hButton[1] = NEW Button(ME) AS "MyButtons"
    hButton[1].Text = "Green"

    hButton[2] = NEW Button(ME) AS "MyButtons"
    hButton[2].Text = "Blue"

    ...

    PUBLIC SUB MyButtons_Click()

      PRINT LAST.Text

    END

### See also

- Object & Class Management