Use the Add Property wizard
- Last Updated: August 24, 2021
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In your class file, you can use Developer Studio to help you generate code for a property definition. The Add Property wizard generates most of the code that you need to define a property for your class.
Follow these steps to generate code for a property definition in Developer Studio:
Step |
Action |
|---|---|
| 1. | Anywhere in your source file, right-click and then select Source > Add Property….The Add Property wizard opens. |
| 2. | Enter the name of the property. |
| 3. | Specify whether the property will be public, protected, or private. The best practice is to make your properties public. |
| 4. | Select the data type for the property using the drop-down list. |
| 5. | If the property will be an array, select the Extent box and optionally specify the number of elements that the array can hold. |
| 6. | If the property will have an initial value, specify it. It must match the data type. |
| 7. | For the Get accessor, leave Readable checked, select Insert implementation if you plan to add custom code, and specify the visibility for reading this property. |
| 8. | For the Set accessor, leave Writable checked, select Insert implementation if you plan to add custom code and specify the visibility for setting this property. |
| 9. | Select an insertion position for the property. A best practice is to select Last Property. |
| 10. | Click Generate. This will create the code to define the property. If you specified that you will insert custom code, you will need to eventually add ABL code to these blocks in the property definition. |