Adding Interface Methods

An interface method consists of a signature only (that is, it contains no method body). When a class implements an interface, the interface methods are implemented by the class as if they were normal Jade methods, although it is your responsibility to provide the required method sources that make the method implementations useful.

When adding methods to an interface:

For details about obtaining bubble help (for example, to locate and insert the required constant or property for the interface), see "Using Bubble Help in the Editor Pane", in Chapter 4.

Before you define a method, you must select the interface to which the method is to be added.

To add a method to an interface

  1. In the Interface List of the Interface Browser, click on the interface for which the method is to be added.

  2. Select the New Jade Method command from the Methods menu.

    The Jade Method Definition dialog, shown in the following image, is then displayed.

    As interface methods can contain only a method signature, controls that do not apply to interface methods are disabled.

  3. Specify the name of your new method in the Name text box. The name value must start with a lowercase character and the name must be unique to the interface to which it is being added.

  4. Click the Enter Text button if you want to specify or maintain descriptive text for the Jade method as part of the definition or maintenance of the method. For details, see "Specifying Text for a Schema Element", in Chapter 3.

    You can also specify descriptive text for the Jade method at any time, by selecting the Text command from the Methods menu. For details, see "Using the Free-Standing Editor Window to Define Text", in Chapter 3.

  5. Click the OK button or the Next button.

The method signature is then displayed in the editor pane of the Interface Browser.