Android Question [Closed] B4XPages - ThreePagesExample - Private Page

LucaMs

Expert
Licensed User
Longtime User
In the ThreePagesExample, B4XPage2, there is:
B4X:
Sub Class_Globals
    ' ...
    Private Page3 As B4XPage3
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
    ' ...
    Page3 = B4XPages.GetPage("Page 3")
    ' ...
End Sub

This way Page3 won't be a private instance of B4XPage3 or am I wrong?
On the other hand, if you created a private instance of that class, you couldn't call the Show method (which is not a member of it).



What I am trying to do is use a B4XPage as if it were a dialog (a complex one, with its own private methods) and therefore I too (or me only?) would like a private instance of a B4XPage.
 

LucaMs

Expert
Licensed User
Longtime User
1 - Page3 variable in ThreePagesExample is just (correctly) a local reference to the page instance added to B4XPages, to access Page3's methods from anywhere inside B4XPage2. So, nothing to do with what I tried to achieve.

2 - I could create a "normal" class for my purpose, it does not necessarily have to be a B4XPage.
 
Upvote 0
Top