As from GeneXus X Evolution 3, theme class names are unique for the entire Knowledge Base; as a result, GeneXus has to synchronize all themes to define the same classes in each one. This synchronization process normalizes the themes to set Theme class cross reference.
The conversion process
The theme conversion process takes place when a Knowledge Base that was created in GeneXus X Evolution 2 or older is opened or imported with GeneXus X Evolution 3 or later. First, the process synchronizes the themes by creating, deleting and modifying classes to have the same set of them for all themes; this synchronization is not for classes defined in the Custom node of Web themes. Then, the process navigates through the SDPanels, WWSD, WebPanels and WW for Web establishing the references between the classes and the controls which use them. This step is not automatic for Web objects when we open a Knowledge Base created in GeneXus X Evolution 2 or older; however, we can go to Menu Bar -> Tools -> Advanced -> Create Theme classes cross-references and force it. Note that it can take a long time depending on the number of Web objects.
Some considerations must be taken into account during this conversion process:
1. Classes that are referenced by a control but do not exist in any theme
When the control is in a WebPanel or a WW for Web the class will be created for all Web themes with the External Class property set to True. On the other hand, when it is in a SDPanel or WWSD the class will be created for all SD themes with the properties of its parent class.
Note: Every class that was created for Web themes is displayed like a hidden class for SD themes and vice versa.
2. Classes with the same name but different parent names
Warning: Duplicate theme class 'Name1' renamed to 'FormName1'. A class with the same name already exists for smart device themes.
Warning: Duplicate theme class 'Name1' renamed to 'FormName1'.
Only one of them preserves the name. The other classes are renamed by concatenating the names of all parent classes, for example: Form-> Name1 is renamed to Form-> FormName1. If the conflict still persists, it adds a number at the end.
This process considers the classes in alphabetical order, as seen in the theme editor. Therefore, if we have Button-> Name1 and Form-> Name1 it is always going to try to rename the last class Form -> Name1.
Recommendation: To make sure that we keep the Theme class cross reference, we have to go through each control that uses the renamed class — i.e.: Name1— and check that all of them are referencing the right class. For example, if a Form used the Name1 class in GeneXus X Evolution 2, it has to use the FormName1 class in GeneXus X Evolution 3.
3. Classes whose names, parent names and theme names are equal
Warning: Theme class 'AttributeNumber1' found more than once. Properties for first instance found were kept only.
Only one of them remains and the rest will be deleted. To fix this problem, we can use the GeneXus version with which the Knowledge Base was created, modify the classes' names and then import or open the Knowledge Base again in order to restart the conversion process.
4. All SD theme classes are renamed
In the case of SD themes all classes are renamed. The new name of the class is composed of the parent class' name and its own name. For example: Attribute-> Evolution is renamed to Attribute-> AttributeEvolution. This change has no consequences, it is just a renaming.
5. No backward compatibility
When the conversion is done, there is no backward compatibility. We cannot open the Knowledge Base using a previous version of GeneXus.
As from GeneXus X Evolution 3