cancel
Showing results for 
Search instead for 
Did you mean: 

Correct way to reload View?

Tuoman
Senior II

I need to reload view completely after major external changes. I don't want to reset each state manually.

What is the correct way to do this? Is this the only way?

void MyView::reloadView()
{
    application().gotoMyScreenNoTransition();
}

This works fine, but requires custom handles for each view.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello Tuoman,

As Romain said, transitioning to the same screen is a good and easy way to reset the states of a screen. Right now, we don't have other specific way to perform this.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

View solution in original post

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

I would do it the same way as well but there might be a better way :grinning_face_with_sweat:. What kind of "major external changes" are you doing ? It seems interesting.

/Romain

Ok. This works, unless ST wants to add "reload" function to TouchGFX views.

>What kind of "major external changes" are you doing ? It seems interesting.

This device loads&displays data from external devices. When these devices are plugged in/out, I want to reset the view and all its contents&states, instead of manually resetting everything.

Alexandre RENOUX
Principal

Hello Tuoman,

As Romain said, transitioning to the same screen is a good and easy way to reset the states of a screen. Right now, we don't have other specific way to perform this.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre