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

  • Project.zip
    30.4 KB · Views: 170

Pepebis

Member
Licensed User
Longtime User
2. Because i commented that line in B4X main page
B4X:
'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

Pepebis

Member
Licensed User
Longtime User
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:
lblHello.Text = Page6.txtUser.Text
app is not starting ( see a previous error ) . App is showing error because of this
B4X:
Wait For (ShowSplashScreen) Complete (Unused As Boolean)
Best Regards ,
Przemek
 
Upvote 0

Pepebis

Member
Licensed User
Longtime User
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

  • Projectlatest.zip
    58.8 KB · Views: 163
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
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:
B4X:
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

LucaMs

Expert
Licensed User
Longtime User
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
Top