375 views
in GUI Development by
  1.  I have an application unit and  multiple dialog units (for example settings unit with all dialogs related to settings option)
  2.  I have a Device Class inside Application unit that has all the events corresponding to all buttons on my hardware (Left Right Menu etc)
  3.  I want to handle these events inside dialog units to update the dialog screen for example scrolling etc.
  4.  When inside any dialog unit, I try to use event handlers associated with the events which are in application unit inside device class i get  the following errors:
  • Endless recursion detected in the initialization of the auto object 'Application::Device'. As long as an auto object is performing its initialization, no recursive accesses to this object are possible.
  • Can not initialize a new object. The constructor of the class 'Application::Application' is failed.  

How can I resolve this issue? Or Is there any other recommendation to notify my dialogs about key events?

 

1 Answer

+1 vote
by
 
Best answer

Hello Mariam,

in principle you can implement a Device Class in order to provide 'button pressed' events to your application.

Since you want to use these button pressed events as regular key events (e.g. to navigate within your GUI application) you should better use the provided infrastructure for keyboard events.

The advantage is: You can easily test your GUI application within the Prototyper by using key events.

Please have a look into the main loop documentation section processing key events. The idea is that within your main loop you can check the hardware buttons and insert a regular key event as soon as a button is pressed.

Best regards,

Manfred.

by
Thank you so much for such quick responses. It really worked perfectly :) Thanks for the suggestion.

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

...