Hi guys,
I ran the example from this thread :
On B4xPage2 class there is there these code
What is the use of this code?
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
App runs OK.
I ran the example from this thread :
[B4X] B4XPages - Cross platform and simple framework for managing multiple pages
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...
b4x.com
On B4xPage2 class there is there these code
B4X:
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?
B4X:
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
B4X:
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.
Last edited: