4. Upgrading from OpenROAD 4.0 or 4.1 : Phase 2: Convert the Applications : Known 4.1 Issues to Resolve : Incorrect FP_CLEAR Field Setting
 
Share this page                  
Incorrect FP_CLEAR Field Setting
This issue is widespread, and will need to be corrected in most applications. It typically manifests as frames having areas with the wrong color.
ISSUE: In versions prior to OpenROAD 5.1 the BgPattern attribute could be set to FP_CLEAR to make the field background clear or translucent. The use of FP_CLEAR was supported only for ShapeFields, although it also worked correctly for FreeTrim fields. For all other field types its behavior was identical to BgPattern=FP_SOLID. In OpenROAD 5.1 all FormFields are documented as honoring the FP_CLEAR setting.
As a result of experimentation by developers, some field types have been left set incorrectly with BgPattern=FP_CLEAR.
RESOLUTION: Update all occurrences of fields (other than ShapeFields and FreeTrim) from BgPattern=FP_CLEAR to BgPattern=FP_SOLID.
To achieve this, Actian Corporation provides the PropertyChanger tool. To request the PropertyChanger tool, contact Actian Support at http://supportservices.actian.com/support-services/support#contacts. For more information, see Upgrading Applications with the PropertyChanger Utility.
To use the PropertyChanger tool on your applications
1. Download the PropertyChanger tool and unzip it.
2. Move the SourceElements.img file into your %II_SYSTEM%\ingres\w4glapps directory.
3. Import the PropertyChanger.exp file as a new application into your OpenROAD 5.1 code repository database.
Note:  Before updating any of your applications, we recommend that you back them up by either exporting the affected applications or taking a checkpoint of the OpenROAD 5.1 code repository database.
To change BgPattern settings using the PropertyChanger
1. In the PropertyChanger application, examine the PropertyChanger component behavior defined for FP_CLEAR, and confirm that it takes the required action. The following is the default code provided to make this change:
/*
** Change all fields that have FP_CLEAR
** (except shapes or freetrim)
*/
IF fieldToChange.IsA(FreeTrim) = TRUE THEN
ELSEIF fieldToChange.IsA(ShapeField) = TRUE THEN
ELSEIF fieldToChange.IsA(MenuField) = TRUE THEN
ELSEIF FormField(fieldToChange).BgPattern = FP_CLEAR THEN
   FormField(fieldToChange).BgPattern = FP_SOLID;
ENDIF;
Modify this code as necessary to meet your requirements.
2. Run the following command from a command window:
w4gldev rundbapp yourdatabasename propertychanger
An Upgrade Assistant is displayed.
3. Using the assistant, do the following:
a. Select which applications you are correcting.
b. Specify that you want to change fields only.
c. Specify that you want to correct FP_CLEAR.
d. Specify the suffix to use if you want the assistant to make backup copies of your existing applications. Leave this blank if you do not want backup copies to be made (for example, if you have backed up your applications elsewhere).
e. Click Upgrade to make the changes.
Note:  You may want to save the PropertyChanger output to help with later acceptance testing (see Phase 3: Conduct Acceptance Testing).
4. Compile and run the applications to confirm that the FP_CLEAR problems are corrected and these changes have caused no new issues.
If you created backup copies using the Upgrade Assistant, delete them after you are satisfied that the changes are correct.
Note:  Review the next issue, Incorrect Field Colors, to determine whether you need to use PropertyChanger again. If not, remove the SourceElements.img image file and the imported PropertyChanger application.