Migration of Components

In Uniface 10, the definitions of components are more explicit than in Uniface 9. This is especially noticeable for Form components, but can also affect components that were converted from forms.

In Uniface 10, all objects that can be contained by a component must have a unique name, including entities, fields, labels, and frames.

  • During migration, objects that had no names will get one, and duplicate names will be resolved. Compatibility of code and runtime is guaranteed in this process.

  • Errors that were allowed in the Uniface 9 Development Environment are no longer allowed, and components that contain such errors are rejected during migration.

The Migration Utility flags these issues and provides information about what must be done to resolve them. In most cases, the issues must be fixed in Uniface 9 before migrating the component again. For more information, see Import and Migration Messages.

Entity Names

Entities always have a name. If it is a temporary name, such as ?ENTITY_1, a more definite name is generated, without a question mark (?), and the related Repository records are created.

If duplicate entities exist in a component, this is an error in both Uniface 9 and Uniface 10. In Uniface 9, such components could not be compiled. In Uniface 10, this is fatal error because of the name conflict.

The Migration Utility cannot resolve the conflict because it cannot determine which entity should be used, so it removes the component from the Repository and reports the following error: Error: Duplicate entity name detected

To correct the problem, edit the component in Uniface 9 before migrating it again.

Fields

Fields always have a name. If it is a temporary name, such as ?FIELD_1, a more definite name is generated, without a question mark (?), and the related Repository records are created.

If duplicate fields exist in Uniface 9, the component can be compiled and executed, but only one field is visible in the runtime component. In Uniface 10, it is not possible to draw a duplicate field, so the Migration Utility keeps the visible field with all associated properties and ProcScript, and deletes the inactive duplicate field(s).

Labels

Prior to Uniface 10, labels did not necessarily have a unique name. During migration, all duplicate labels are renamed.

Labels

Prior to Uniface 10, lines did not have names. During migration, names are generated for each line in a component (LINE_1, LINE_2, and so on).

Area Frames

Prior to Uniface 10, default areas usually did not have a name, although it was possible to give them a name. In Uniface 9.7, it was possible to use the name of an area as a style identifier. Any frame with the same name is styled the same way. In older Uniface versions, area frames with the same name as an entity (known as named area frames) could be used to control print behavior.

In Uniface 10, area frames must have a unique name, so a style attribute has been introduced for area frames.

During migration, the style attribute is initialized to the original area frame name. If needed, the area name is then regenerated to ensure names are unique (AREA_1, AREA_2, and so on).

Printer Frame Names

All printer frames (header, footer, and break frame) are in the same name space as entities. Duplicate names are not allowed and are handled the same way. If the Migration Utility encounters duplicate printer frame names, it removes the component from the Repository and reports the following error: Error: Duplicate entity name detected

To correct the problem, edit the component in Uniface 9 before migrating it again.

Printer Frames in Entities (CHUI Origin only)

In rare situations, a printer frame is defined inside an entity frame. This is only possible if the component originates from a character mode application (probably developed with Uniface 5.1 or older) and the component was never opened and edited with the graphical layout editor.

If the Migration Utility encounters this construction, it removes the component from the Repository and reports the following error: Error: Parent type Type1 is invalid for type Type2

To correct the problem, edit the component in Uniface 9 before migrating it again.

Overlapping Frames

In some components, entity or printer frames may overlap. This is most likely to occur in Form components, but it is possible in older components created with the frame-in-frame technique, or in components converted from forms.

If the Migration Utility detects overlapping frames, it removes the component from the Repository, and reports an error: Error: Frames Frame1 and Frame2 are overlapping

To correct the problem, edit the component in Uniface 9 before migrating it again.

Entity Dimensions (CHUI origin only)

In rare situations, a component entity may lack dimension information. This is only possible if the component originates from a character mode application (probably developed with Uniface 5.1 or older) and the component was never opened and edited with the graphical layout editor.

If the first entity on the component has no dimensions, the Migration Utility corrects the problem. However, if dimension information is missing in other entities, the Migration Utility removes the component from the Repository and reports an error such as: Error: Parent type Type1 is invalid for type Type2

A typical error is that a field is found which seems to have the component as its direct parent (rather than an entity, as it should).

To correct the problem, edit the component in Uniface 9 before migrating it again.

Frame Dimensions

In rare situations, a component may contain entity or printer frames for which dimension information is missing. This is most likely to occur with old components that have not been edited using the graphical layout editor. In this case, the Migration Utility removes the component from the Repository and reports the following error: Error: Dimension information for ObjectEntity.Model is missing

To correct the problem, edit the component in Uniface 9 before migrating it again.