87 views
in GUI Development by
super() is called for invoking the base class method. Should we call super() from the init() method of derived class ? or base class init will be called automatically?

1 Answer

0 votes
by
 
Best answer

Hello Thanseer,

Unlike ordinary methods, Init(), Done() or ReInit() methods (awa: constructor, destructor and re-constructor) are invoked by the system only. In derived classes when the constructor method is overridden, the system ensures automatically, that starting with the oldest ancestor class every constructor implementation is being called. The usage of the pseudo method super() is not necessary and even not possible.

Should we call super() from the init() method of derived class ?

Trying to use super() will cause a compiler error in this case.

base class init will be called automatically?

Yes.

I hope it helps you further.

Best regards

Paul Banach

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

...