419 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...