Cannot set App.CurrenScreen.Content in App.Open

Before I file a bug report wanting to make sure this was not by design. I was hoping to be able to change the primary Screen on the fly, I am getting a NilObjectException when I try this in App.Open in the Navigation Example App.

Dim v As New MainView App.CurrentScreen.Content = v

What is the benefit of doing this in App.Open versus just setting MainView as the primary view in the IDE Screen properties?

Anyway, I suspect the screens are not yet set up in App.Open. Changing the value in View.Open ought to work, though.

If there is a registration file I go to one screen, if not I go to another. I was trying to not have the primary one actually display.

You can’t do that in iOS. You will get rejected from the app store for trying to have your own licensing system.

This is registering with a website that it communicates with. It is not a software license.

Ah okay. That should work, you just have to provide them with a sample login.

Putting it in the View.Open I still get the NilObjectException.

No NilObjectException if I place it in View.Activate Not really where I would want it because other places may activate that event.

Perhaps a blank third screen?

               Launch Image
                    v
Launch Image Copy that determines what's next
   v                                   v
Logged in                       Not logged in

Yes that’s the direction I was going to now go. But also going to file a bug report unless someone at Xojo feels that’s by design.

[quote=298712:@Tim Parnell]Perhaps a blank third screen?

Launch Image v Launch Image Copy that determines what's next v v Logged in Not logged in [/quote]

It never hurts to file a Feedback case. I don’t know if it’s by design, although it feels like it might be. But with a Feedback case, the right person will be able to look at it and make that determination, closing it if necessary.

Changing content for a ScrollableArea seems to work reliably. You might think about filling your MainView with that and creating two ContainerControls to serve as your optional sign-in screens. Then you can swap them in and out as appropriate using ScrollableArea.Content = New CC1 or CC2.