Hi guys,
I ran the example from this thread :
B4XPages is a library that serves two purposes: 1. Make it simple to develop B4A apps by solving almost all of the challenges involved with Android complex activities life cycle. B4XPages makes B4A behave more similar to B4J and B4i where the new "B4XPage" element is a regular object that is...
On B4xPage2 class there is there these code
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
Root.LoadLayout("Page2")
Page3 = B4XPages.GetPage("Page 3")
End Sub
What is the use of this code?
Page3 = B4XPages.GetPage("Page 3")
Isn't it the Page3 already declared as a class of B4XPage3 ? Just like common class, why should get the instance again?
The code made it possible to use Page3 subs before it is initialized, is this the only purpose?
Changed the codes into these
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
Root.LoadLayout("Page2")
Page3.Initialize
'Page3 = B4XPages.GetPage("Page 3")
End Sub
App runs OK.