RAD Studio (Common)
Automating the Creation of Methods with the Class Explorer

Using the Class Explorer you can automate the creation of methods

To automate the creation of methods:

  1. Open the Delphi Class Explorer window by choosing ViewDelphi Class Explorer.
  2. In the Class Viewer pane, click a class or an interface into which you wish to add a new method.
  3. Click the right mouse button. In the appeared context menu choose the Add Method item. The Add Method dialog box appears.
  4. Into Method name type the name for the method to be added.
  5. In the Add to class combo box, select the class or interface to which you wish to add the method. By default, the class/interface currently selected in the Class Viewer pane is prompted. You can, however, change this to any other available class/interface selecting it from the drop-down list in the combo box. Select the @unitclass to add the method to the global scope. Notice that when you add a new method into an interface, then only the method declaring code is generated. (No implementation code is generated.)
  6. In the Arguments field, type in the list of arguments, if any. Arguments should be typed exactly as they appear between the parentheses in the method declaration.
  7. In the Method type group, select the type of the method. You can select among: function, procedure, constructor, and destructor.
  8. In the Return type combo box, select the type of the return value. You can select one of the predefined types from the drop-down list in the combo box or you can type in any other existing type.
  9. In the Visibility group, select one of the the visibility specifiers. The selected visibility specifier will be applied to the method being created.
  10. Click OK. Into the specified class/interface the code for the declaration and default implementation of the specified method will be inserted.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!