Method: Re-constructor ReInit()

Every class and class variant definition may implement its own re-constructor. Re-constructors are specialized methods, which are invoked automatically when the language selection changes at the runtime. Accordingly the objects may re-evaluate their initialization code and update themselves to the newly selected language. In Embedded Wizard, re-constructors are usual methods named explicitly with the identifier ReInit and declared without any return value and any parameters:

Declaration of a re-constructor method within the Code Editor window.

Unlike an ordinary method, re-constructors are invoked by the system only. Calling the ReInit() method directly from another method is not possible. Moreover, in derived classes when the re-constructor method is overridden, the system ensures automatically, that starting with the oldest ancestor class every re-constructor implementation is being called. The usage of the pseudo method super() is not necessary and even not possible.

Override inherited ReInit() method

Each class inherits the ReInit() method from its immediate ancestor class. In case of a class not descending from a concrete class, the ReInit() method is inherited from an internal class serving as very base ancestor for all Chora classes. In other words, each Chora class includes implicitly an ReInit() method. You see this inherited method in the Inspector window:

Inherited re-constructor within the Inspector window.

In order to implement this method:

Localize and override the ReInit method first.

Then open the method for editing in the Editor window.

Implement the ReInit() method

ReInit() methods are implemented similarly as you do with ordinary methods.