Studio Developer Manual / Version 2304
Table Of Contents
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 TypeScript class. In particular, this means
that methods calls in the TypeScript file (not mere usages of methods as event handlers) will find
the fields of the base class uninitialized. For example, calling Config(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: Config(TextField, { name: computeName(config) }
.