Android Question Timing issue in B4XPages?

Bob Spielen

Active Member
Licensed User
I get sometimes the attached error message! I think I have a timing problem, in other words Im trying to read the Page when it is still being loaded...
How can I know for sure when the Page was loaded?
 

Attachments

  • Issue1.txt
    1.4 KB · Views: 147

Bob Spielen

Active Member
Licensed User
Tks for the fast reply!
2 prints logs release mode

I have a MyStarter that does some download from the server. Can it be that during the time that MyStarter works I have the pointed issue caused by delaying the Pages.Initialize ?

MyStarter:
    Dim MStarter As MyStarter: MStarter.initialize 
    Wait For (MStarter.Start_sevice) complete(Ok As Boolean)

    PedidoPg.initialize
    B4XPages.AddPageAndCreate("PedidoPg", PedidoPg)
  
    Entrada.initialize
    B4XPages.AddPageAndCreate("Entrada", Entrada)
 
    MenuPg.Initialize
    B4XPages.AddPageAndCreate("MenuPg", MenuPg)

    ProdutosPg.initialize
    B4XPages.AddPageAndCreate("ProdutosPg", ProdutosPg)
  
    If badger1.IsInitialized = False Then badger1.initialize
 

Attachments

  • Issue_Release_Mode.txt
    1.1 KB · Views: 89
  • Issue_Release_Mode2.txt
    1.3 KB · Views: 100
Last edited:
Upvote 0

Bob Spielen

Active Member
Licensed User
All that I can say, based on the information you provided, is that the error happened when you clicked on lblEntrada and you tried to set the Text property of a different view that wasn't initialized.
Yes on other B4XPage. Does it exist a suggestion to check if this other Page has been already (finished) loaded?
 
Upvote 0

Bob Spielen

Active Member
Licensed User
All that I can say, based on the information you provided, is that the error happened when you clicked on lblEntrada and you tried to set the Text property of a different view that wasn't initialized.

Resolved...I changed from this:
B4X:
Entrada.LbLTitulo1.text = "Entrada"
B4XPages.ShowPage("Entrada")

To this:

B4X:
B4XPages.ShowPage("Entrada")
Entrada.LbLTitulo1.text = "Entrada"
 
Upvote 0
Top