iOS Question Can I somehow set Page1.Visible (read only)? [Restarting B4i/B4A]

Andris

Active Member
Licensed User
Longtime User
I'm occasionally restarting my iOS app like this:
B4X:
    Page1.RootPanel.RemoveAllViews
Application_Start(NavControl)
I don't know if this is an acceptable thing to do, but most of the time it works. However, in certain situations that I haven't been able to pinpoint yet, this restart ends up displaying a blank (white) screen. When I log the visibility of various objects on my layout, I find that they all report back as normal visibility, so my layout for Page1 is loading as it should.

The only thing that is abnormal is Page1.Visible, which reports back as False. I have no idea why this happens in some cases. Is there any way to set Page1.Visible=True to see if it would solve my problem? I'm hoping that the fix would be something simple like that, instead of totally staying away from restarting my app in this manner.
 

Andris

Active Member
Licensed User
Longtime User
Not a good practice to call Application_Start.

You should instead create another sub and call it from Application_Start and whenever you want to reset the state.
I had a feeling you would tell me that. :rolleyes: Thank you. This differs from B4A though, doesn't it?
 
Upvote 0
Top