lang • me

ME

ME

Returns a reference to the current object.

ME is mandatory when you want to call an inherited method, or access an inherited property or variable.

Examples

' Gambas form

...

Public Sub SetTitle(Title As String)

  Me.Text = Title

End

Public Sub MoveRight( Step As Integer)

  Me.Move(Me.X + Step , Me.Y)

End

The next example shows that ME returns the Form, while LAST returns the activated Button.

Public Sub Button5_Click()
  Print Me;; Last
End
(Form1 0x80d8090) (Button 0x80fa060)

See also