Automating the Creation of Fields with the Class Explorer

From Appmethod Topics
Jump to: navigation, search

Go Up to Object Pascal Class Explorer Topics

Using the Object Pascal Class Explorer you can automate the creation of fields

To automate the creation of fields:

  1. Open the Object Pascal Class Explorer window by choosing View > Class Explorer.
  2. In the Class Viewer pane, right-click a class into which you wish to add a new field.
  3. On the context menu, choose the Add Field item. The Add Field dialog box appears.
  4. Into Field name type the name of the field to be added.
  5. In the Add to class combo box, select the class to which you wish to add the field.By default, the class currently selected in the Class Viewer pane is prompted. You can, however, change this to any other available class selecting it from the drop-down list in the combo box.Select the @unitclass to add the field to the global scope.
  6. In the Type combo box, select the type of the field. 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.
  7. In the Visibility group, select one of the visibility specifiers. The selected visibility specifier will be applied to the field being created.
  8. Click OK. The code declaring the field with the specified properties will be inserted into the specified class.

See Also