B4J Question [abmaterial] page is left hanging

liulifeng77

Active Member
Licensed User
Longtime User
Sub ConnectPage()

page.AddModalSheetTemplate(testsheet)

page.ShowModalSheet("mytest")



page.Refresh ' IMPORTANT

page.FinishedLoading

End Sub



page is left hanging.

if move the "page.addmodalsheettmeplate(testsheet)" to [sub buildpage()], it will be no problem.
 

Harris

Expert
Licensed User
Longtime User
Sub ConnectPage()

page.AddModalSheetTemplate(testsheet)

page.ShowModalSheet("mytest")



page.Refresh ' IMPORTANT

page.FinishedLoading

End Sub



page is left hanging.

if move the "page.addmodalsheettmeplate(testsheet)" to [sub buildpage()], it will be no problem.

I get this all the time during my dev. ALWAYS something (stupid) I did (added) to the page. Inspect page may (or may not) show the issue.
Often, I have to roll back to find what caused it - if I can't see it in code... but, as always... it is in your code - not in this dev environment - as has been proved to me many, many, many times.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
One more caveat.


Low bandwidth will leave your page hanging. I have a site when trying to be reached over a sat connection would just spin the ' circles '.
The load for the site is low, yet still cant understand why this is so....

We shall (eventually) get to the bottom of this issue.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
AddModalSheet is like AddComponent. As long as you did not do a page.refresh, it does not exist on the browser side so running ShowModal() at that point is propably causing 'the hang'

So probably (untested) could work:

B4X:
Sub ConnectPage()
    page.AddModalSheetTemplate(testsheet)
    page.Refresh ' IMPORTANT
    page.FinishedLoading
    page.ShowModalSheet("mytest")
End Sub
 
Last edited:
Upvote 0
Top