285 views
in Embedded Wizard Studio by

Hi,

My main screen of my GUI is actually an Outline swiping between 3 screens.

One of these screens contains a button to open another screen over the top.

When I close the pop-up screen, the UpdateViewState is not called.

If I Alter the GUI to make the screen with the button the main screen (getting rid of the Outline), UpdateViewState is called as expected when the pop-up closes.

My overridden UpdateViewState is only:

super (aState);

trace "Dashboard UpdateViewState Called";

Any suggestions?

Thanks

Phil

 

1 Answer

0 votes
by

Hello Phil,

UpdateViewState() is called only when the state of the corresponding component has changed or if it has been requested explicitly by using the method InvalidateViewState(). Presenting or hidding a component does not affect the state either of this or other components. Accordingly, none of them will perform UpdateViewState(). I suppose, UpdateViewState() is called because the affected component has received (or lost) the state SelectedFocused or Modal. See also: Common component states.

This could explain (as far as I understood your explication) why it works with the main screen. The main screen is probably focused. Presenting the Popup revokes the focus state. Closing the popup restores the state again. Every state alternation causes the UpdateViewState being called.

What can you do? From your explication it is not simple to deduce the structure of the application. Do you make the popup modal? If yes, just ensure that the actually selected screen is focused before the popup is shown.

Alternative approach could be to receive a signal from the popup when the user closes it and then trigger the necessary update.

Best regards

Paul Banach

 

Embedded Wizard Website | Privacy Policy | Imprint

...