Android Question B4X pages with splash screen

Pepebis

Member
Licensed User
Longtime User
Hello this is my post related to the previous one.
When the Splash screen is loading it's showing error ( this is only happening when in BX4 main pageis waiting for splash screen to finish loading )
'Wait For (ShowSplashScreen) Complete (Unused As Boolean)
without this is working and i can sending text from page no.6 to mainpage . But ... when app is loading mainpage is running with splash screen .
Please see an example.
Best Regards ,
Przemek
 

Attachments

2. Because i commented that line in B4X main page
B4X: Copy
'Wait For (ShowSplashScreen) Complete (Unused As Boolean)
error will show up when you uncomment it .
1. Error is
java.lang.RuntimeException: Object should first be initialized (B4XView).
 
Upvote 0
I took it from that example. Problem is when i have another page ( page6 in my example ) and when I'm trying to send a text ( on page6 ) to the label ( on main page )
B4X: Copy
lblHello.Text = Page6.txtUser.Text
app is not starting ( see a previous error ) . App is showing error because of this
B4X: Copy
Wait For (ShowSplashScreen) Complete (Unused As Boolean)
Best Regards ,
Przemek
 
Upvote 0
I followed. Still the same. Error is showing when it's trying to refer to that label on another page. Good thing now is that splash screen showing for few seconds before app crash :)
 

Attachments

Upvote 0
Wow. Amazing that you are still missing the manifest change.
Point #1 in the example.

It crashes because the Appear event is raised before the layout is loaded.
Change the code to:
Code: Copy
Private Sub B4XPage_Appear
    If lblHello.IsInitialized Then
        lblHello.Text = Page6.txtUser.Text
    End If
End Sub

Or better, delete it and set the label directly from page 6 when needed.
 
Upvote 0
Now, that he helped you solve your long standing issue, you need to work on spelling his name correctly. Just kidding of course.
1602079583453.png
 
Upvote 0
Back
Top