Android Question How to refer to many variables in B4XMainPage from other pages

johnaaronrose

Active Member
Licensed User
Longtime User
In https://www.b4x.com/guides/B4XPagesCrossPlatformProjects/?page=23 it states that you can refer to Public variables in another module by use of code:
B4X:
Public Page2 As B4XPage2 = B4XPages.GetPage("Page 2")
Page2.lblTest.Text = "Page 3 was displayed."
I would like to do this to refer to a number of Public variables in B4XMainPage (which I converted from the old Main Activity as I'm converting this project to be a B4XPages one). I've tried various code in the other pages e.g. MainPage = B4XPages.B4XMainPage, but it either gives compiler or runtime errors.
How can this be done?
 

agraham

Expert
Licensed User
Longtime User
 
Upvote 0
Top