Delphi Properties

Return to Introduction  Previous page  Next page

Enterprise Architect has comprehensive support for Delphi properties. These are implemented as Tagged Values, with a specialized property editor to help create and modify Class properties. The Class image below illustrates the appearance of a Delphi Class that has had properties added to it. These are stored as Tagged Values, and by using the Specify Feature Visibility element context menu option, you can display the 'tags' compartment that contains the properties. Imported Delphi Classes with properties have this feature automatically made visible for your convenience.

ShowTags

Note: when you use the Create Property dialog from the Attribute screen, Enterprise Architect generates a pair of Get and Set functions, together with the required property definition as Tagged Values. You can manually edit these Tagged Values if required.

Example of a Delphi Class

To manually activate the property editor

1.Ensure the Class you have selected has the code generation language set to Delphi
2.Right-click on the Class and select the Delphi Properties context menu option to open the editor.

The Delphi Properties editor enables you to build properties in a simple and straightforward manner. From here you can:

·Change the name and scope (only Public and Published are currently supported)
·Change the property type (the drop-down list includes all defined classes in the project)
·Set the Read and Write information (the drop-down lists have all the attributes and operations from the current class; you can also enter free text)
·Set Stored to True or False
·Set the Implements information
·Set the Default value, if one exists.

DelphiPropertisDialog

Note: Public properties are displayed with a '+' symbol prefix and published with a '^'.

Note: When creating a property in the Property Wizard (accessed through the Attributes dialog), you can set the scope to Published if the property type is Delphi - see the example below.

PropertyDetails

Limitations

·Only Public and Published are supported
·If you change the name of a property and forward engineer, a new property is added, but the old one must be manually deleted from the source file.