On GeneXus X Evolution 2, themes classes are referenced by their name from attributes, grids and other controls. But this implementation may cause a number of problems: we do not know what classes are being used, or which objects are using them\;, or we could delete classes that are being referenced, among other things. In order to solve these problems, GeneXus created the theme cross reference, which enables both the user and GeneXus to know which objects reference a given class. This feature adds a lot of knowledge to a KB, and removes ambiguousness, while allowing a better control over the use of themes and their classes.
As of GeneXus X Evolution 3, theme class names are unique for the whole KB and apply to all themes. So, when we define a new class in a theme, it is actually added to all of them — see Management considerations on Theme classes. It is important to note that a Knowledge Base conversion happens when we open, with GeneXus X Evolution 3 or higher, a KB created with GeneXus X Evolution 2 or earlier. See Theme conversion process for further details on this process.
cross reference of a given class
To see which objects reference a given class we use the References menu option listed in the contextual menu of this theme class.
The following are some of the benefits in this feature:
- It avoids accidental deletion of classes that are being used by some objects.
- It enables us to see the classes referenced by an object.
- It enables us to know which objects are affected with changes to a class.
- When a class is renamed, GeneXus will maintain the integrity between the class and all objects referencing it.
- We can be sure that all Themes contain definitions for all classes, so that changing themes in runtime - Using the SetTheme function - is more effective.
- For theme class cross reference, only the value set in the control's Class property in design time is taken into account. Assignments like Form.Class = "Form" in Events or Rules are not taken into account.