Since I am smarter than the son of a stone marten and a fox , in the B4XMainPage I added that page (paglobby) to the B4XPages using AddPageAndCreate instead of AddPage.
Here is the result (i.e. not even in this way the B4XPage_Created event-routine is actually executed, the log I wrote as the first line of this routine is not executed):
Very soon, in 2033, I will be able to unravel this mystery!
Since I am smarter than the son of a stone marten and a fox , in the B4XMainPage I added that page (paglobby) to the B4XPages using AddPageAndCreate instead of AddPage.
EDIT: pagLobby was initialized in B4XMainPage Initialize, when I created that animated gif; next I moved that initialization to B4XPage_Created but nothing changed.
EDIT: pagLobby was initialized in B4XMainPage Initialize, when I created that animated gif; next I moved that initialization to B4XPage_Created but nothing changed.
Finally I found the bug, doing what I wrote above: I realized that, instead, in the B4XMainPage Initialize I had initialized other pages but not that one.
I will definitely never make that mistake again, I will always write the Initialize right before the AddPage, but this type of error should have thrown an exception, the class was not initialized!
The anomaly of the double execution of the Appear or the Disappear (see attached project previously) is however a bug of B4XPages, I think.
1. Note that closing the non-top page is not supported on B4i.
2. If you want to show the next page and close the current one then it is better to call:
B4X:
B4XPages.ShowPageAndRemovePreviousPages("pagOne")
3. This is indeed a bug in B4XPages and it will be fixed in the next update.