Documentation

Reference
qxt:variant (qx.core.Variant)

Manage variants of source code. May it be for different debug options, browsers or other environment flags.

Variants enable the selection and removal of code from the build version. A variant consists of a collection of states from which exactly one is active at load time of the framework. The global map qxvariants can be used to select a variant before the Framework is loaded.

Depending on the selected variant a specific code path can be chosen using the select method. The generator is able to set a variant and remove all code paths which are not selected by the variant.

Variants are used to implement browser optimized builds and to remove debugging code from the build version. It is very similar to conditional compilation in C/C++.

Here is a list of pre-defined variant names, the possible values they take, and their system default:

Variant namePossible valuesSystem default
qx.client [ “gecko”, “mshtml”, “opera”, “webkit” ] <auto-detected>
qx.debug [ “on”, “off” ] “on”
qx.aspects [ “on”, “off” ] “off”
qx.dynlocale [ “on”, “off” ] “on”

LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk & Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.

qooxdoo