421 views
in GUI Development by
The Init methods of the super class is executed before the values of the properties are set. Is there a method, which is executed after the OnSet - methods ?

1 Answer

0 votes
by

In general, the Init() constructor of a class is called after the entire class is initialized and after all properties got their initial value. The intial value of the properties are always set directly without calling their onset methods.

If you make an assignment of a value to a property within the Init() constructor, the onset method of the property will be called. As far as I understood your question, you are looking for a method that will be called after the entire class is intialized and maybe after all signals are handled: Just define a slot method and put a notification via postsignal or idlesignal at the end of the Init() method.

Just for clarification, these are the details and rules of the initialization when an object is created:

  • The initialization process always starts with the object's oldest base class. This ensures that all variables, properties and arrays defined in a base class have been properly initialized before the initialization of the derived class may proceed.
  • During initialization, the Runtime Environment only considers variables, properties and arrays for which an initial value was given in the definition of the class. All other variables, properties and arrays that have not been explicitly initialized still keep a value of 0 (zero) or the value already derived from the base class.
  • The initialization order is predetermined by the Z order. The Z order reflects the order in which variables, properties and arrays are listed within the definition of a class.
  • If the definition of the class contains embedded objects, these are also initialized fully according to the Z order.
  • Variables, properties and arrays that are not inherited from the base class are always initialized by a simple assignment of values. The initialization value is copied directly into the memory area of the affected variable, property or array. This means that a property's onset method is never called when the property is initialized the first time.
  • The re-initialization of inherited variables and arrays also occurs through a simple assignment of values. The initialization value is copied directly into the memory area of the affected variable or array.
  • When re-initializing inherited properties, on the other hand, the onset method of the affected property is called with the initialization value as its argument.
  • Once all variables, properties, arrays and embedded objects have been correctly initialized, the user-defined Init() constructor is called. Here, the programmer can define additional initialization steps that go beyond simple assignment of values.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...