loading table of contents...

7.4.4. Complex Setups

Keep in mind that somewhat counter-intuitively, the base class constructor has not run while the component tree is built in the constructor of the EXML class. In particular, this means that methods calls in the EXML file (not mere usages of methods as event handlers) will find the fields of the base class uninitialized. For example, calling <textfield name="{computeName()}" .../> would enter the method computeName before the base class constructor has run, so that some initialization would have to be done early on demand. On the other hand, in <button handler="{handleButton}"/> the method handleButton is only invoked after the component is initialized. If a method that is called early needs access to the configuration, you must pass the config object as a parameter: <textfield name="{computeName(config)}" .../>.