This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.
We have a requirement of switching theme based on pre/post app init service callback response. But before waiting for the response, all the component constructors are executed.
Note :
First form, which is shows as startup page don`t have any components. I wonder, why components` constructors are triggered, though its not part of first form.
In the case of a free form project, the widgets within a form are initialized on first access of the form in code.
e.g. If there is a form with name "Form1" in the application and somewhere in the code if "Form1" is accessed, widgets within "Form1" will be initialized.
If any such form consists of a component instance, then the constructor of its corresponding component source is invoked.
Ensure that there are no references to forms containing component instances within the code that is executed during application startup.
Looks like an issue. All forms are being initialized on application launch itself. Please destroy the form so that you can work with its constituent component's constructor post your service call.