[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


New Method Window

The New Method window helps you create a new method for a selected component in the Browser window. To display this window, make sure that the Browser window is frontmost, then choose New Method from the Browser menu. Alternatively, click the new item icon (), as shown in Figure 15.3. The New Method command changes slightly, based on the framework you use to develop your code. For example, when developing a Java RAD project, the command changes to New Bean Method.

The New Method window is shown in Figure 15.6. This window consists of the following parts:


Name

Enter a name for the new method in this field. The name you enter must comply with naming conventions in the framework programming language. For example, you cannot use spaces in names for some languages.


Return type

Enter an appropriate method return type in this field. The type you specify must be a valid return type in the framework language.


Parameters

If desired, enter method parameters in this field. Some example parameters are listed above this field.


Optional throws

If desired, enter exception-handling information (throws) in this field. Some example throws are listed above this field.


Package required for parameters

If you wish, you can enter in this field a required package for the parameter. Some example packages are listed above this field.

New Method window:

Modifiers

Use the Access and Specifier pop-up menus to choose the access level and method specifier for the new method. Possible access levels include Public, Protected, and Private. Possible specifiers include None, Abstract, Final, and Static. You can enable the Native or Synchronized checkboxes as desired to further describe the method's modifiers.


Declaration

This section shows you the current form of the declaration as specified in the window. After you change a particular value or checkbox, the Declaration field updates to reflect your changes. This field displays information only after you complete the Name and Type fields and specify an Access level.


Add and Cancel buttons

Click Add to confirm the current window information and add the new method, or click Cancel to discard your changes.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000