566 views
in GUI Development by
Hi,

Requirement:

Whenever there is a Timer expiry in the backend i need to display one screen consider Home Screen in the GUI .For that i  am trying to use the Device class .

Is it Possible to Add or remove screen from Device class

How to access the uint core things like GetRoot() and GetModalGroup()  in the Device class so that i can add or remove the screen from the device class

i tried creating a method in the Device Class which contains

var Core::Root  root       = GetRoot();

var Core::Group modalGroup = root.GetModalGroup();

Then create a object for the respective screens and pass to

root.add() and root.BeginModel(). So that i can add the screen from the Device class interface.

This throws an error while running.

Could you please suggest how to do it or any other way to do it.

 

Thanks in Advance !!!

Regards,

varun kumar

1 Answer

0 votes
by

Hi Varun Kumar,

please try to keep a clear separation between your GUI application and your underlying system (whatever it does). Instead of adding some screens within the device class - just send a system event from the device class and let the GUI application react accordingly. The device class is just the interface to the underlying system without any information about your GUI implementation. This means, each time when some event happens (e.g. a certain timer in your backend is expired), you can send a system event to your GUI application.

Please have a look to the chapter System Event and System Event Handler for more details.

Best regards,

Manfred.

by
Thanks for the response!!

My Project requirement as follows:

a. We have many screens in our application.

b.. There is one Home screen which need to be displayed when ever Timer expires in other screens.

c. It is not good idea to add the code in every screen to remove the current screen and add the Home screen using Root object as mentioned above .

d.So we try to Remove and add the Screen from the Device class ,this will avoid the duplication of code .

As per your suggestion we need to handle the Removal and Addition of screens from the respective UI screen and not from Device class

Is there any way to Add and Remove Screens from the Common point rather then doing it in individual screens?

Regards,

Varun Kumar
by
Hi Varun Kumar,

there is no need to add the code (the System Event Handler) in every screen to remove the current screen and to add the Home screen.

Instead, you can place the System Event Handler within your Application object in order to remove the current screen and to navigate to the Home screen. Then you have still the separation between the GUI and the device class. And there is no need for duplication of code.

Best regards,

Manfered.

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

...