.. _Declare Method:

Declare Method
==============

An error is triggered when calling a method which does not exist.

Place the editor cursor on the error's line and press :kbd:`Ctrl+1`, select **Declare function ...** or **Declare task ...** from the list of quick fix proposals and press  :kbd:`Enter`.

.. figure:: ../../images/common/sv_quick_fix_declare_method_list.png

The method stub declaration is inserted in the appropriate scope.

.. figure:: ../../images/common/sv_quick_fix_declare_method_after.png

.. note::

	The method signature (return type, argument names and types) is automatically detected from context.

.. note::

	The implementation stub contains a TODO reminder which shows up the Tasks View. See :ref:`Track Tasks using TODO Markers`.

.. tip::

	You may change the function's return type, as well as the name and type of each argument. Press **Tab** key to switch between the edit boxes, and  :kbd:`Enter` when done.

.. tip::

	You can change the method signature by editing the :ref:`Method Code Templates`

 


