Updating a copy of a K2BTools theme

Developers may decide to make a copy of a Theme object provided by K2BTools and use it in an application. This document describes how to upgrade that copy when a new K2BTools version is installed.

It you a need to update a K2BTools theme please read Updating a K2BTools theme to a new version.

The problem

When a new K2BTools version is installed, changes made to the K2BTools theme should be also made to the copy used in the application. The problem is how to identify the changes and how to apply them to the copy without losing your mind in the process.

The solution approach

At K2BTools labs we keep track of changes we make to a theme. A file is kept holding all changes made to a theme from one version to the next one. The concept is that, applying these changes, one at a time, version after version to the copied theme will make the copy equal to the original and keep developer customizations.

As changes are kept at the theme class property level, conflicts can only happen if a developer changes the same property of the same class as K2BTools team do. A conflict log is generated (output window) that should be used to identify and change back, if required, conflicting changes.

Apply theme changes

The Apply theme changes menu option (located under K2BTools/Advanced) is used to update a copy of a K2BTools theme. The dialog prompts for a Theme object and a file.

Apply changes menu option

The Theme must be the one that needs to be updated. It usually is a copy of a K2BTools theme.

The file is the one that holds the changes made to a theme between two versions. It should be chosen among the ones in <Genexus installation directory>\Packages\K2BTools.

Their names have the format <ThemeName>-<FromVersion>-<ToVersion>.xml (K2BOrion-12.4-13.0.xml, for example). Choose the one that fits the original theme name and the FromVersion the target theme is.

When both are selected, pressing the Confirm button will upgrade the seleted them to the ToVersion specified in the selected file name. If the ToVersion is no the last one, repeat the process as many times as needed.

The process generates an output log. If conflicts arrise they are shown as warnings. There may be errors too. The developer should analyze the output and take the appropriate actions.

Apply theme changes

Related documents