One important remark (already said): " Self " is
your a Free Pascal reserved word. Self already - automatically - contains the instance of the object (like "this" in other languages) in which a method - like
listen_band - is declared. So, Self is the created TForm's instance.
So it would be better to write:
procedure TForm.listen_band(Sender: TObject);
var
i, j, k: integer;
begin
i:= 2; j:= 3; k:= i + j;
showMessage('The total is ' + InToStr(k));
showMessage('The object name - TForm.name - is: ' + Self.name);
showMessage('The object calling this method, is of the type: ' + Sender.ClassName);
end;
ps: it would be better to post a short zipped example program, in order to understand, what you would like it must do.