RAD Studio (Common)
ContentsIndex
PreviousUpNext
Working with a Field

This topic applies to implementation projects only. 

In the source code, it is possible to declare several fields in one line. This notation is represented in diagram as a number of separate entries in the Fields section if a class icon. However, you can rename the fields, change modifiers, set initial values and so on, all modifications being applied to the respective field in the diagram icon. Also you can copy and move such fields in diagram (using context menu commands or drag-and-drop), and the pasted field appears in the target container separately.

To rename a field:

  1. Choose a field.
  2. Enter the new name in the in-place editor of the Diagram View or Model View, Name text field in the Object Inspector or the source code editor.

To define the visibility modifier:

  1. Choose a field.
  2. Enter the visibility symbol in the in-place editor in the Diagram View, or select one from the Visibility combo box in the Object Inspector, or edit in the source code editor.

To define the stereotype of a field:

  1. Choose a field.
  2. Use the in-place editor in the Diagram View, or stereotype combo box of the Object Inspector or the source code editor.

To define modifiers, initial values, associated objects and so on:

  1. Choose a field.
  2. Use the Object Inspector or the source code editor.
So doing, the model and the source code are kept in sync.

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