Robert Valentino Well-Known Member Licensed User Longtime User Sep 20, 2020 #1 Points 5, 6 & 7 of this post: https://www.b4x.com/android/forum/threads/b4x-b4xpages-what-exactly-does-it-solve.119078/ Code: Copy We can directly call public methods of other pages. No need to use CallSub or CallSubDelayed. We can directly access public global variables of other pages. We can directly access and manipulate views of other pages. I know I am a bad searcher (probably being 70 and mind going to mush), but I cannot find any examples of this. if I use Code: Copy B4XPages. I don't see any of the public's in B4XMainPage and if I try and use Code: Copy B4XMainPage. isn't allowed Confused on how to see the public variables in B4XMainPage and how to call methods without using CallSub or CallSubDelayed. Thanks BobVal
Points 5, 6 & 7 of this post: https://www.b4x.com/android/forum/threads/b4x-b4xpages-what-exactly-does-it-solve.119078/ Code: Copy We can directly call public methods of other pages. No need to use CallSub or CallSubDelayed. We can directly access public global variables of other pages. We can directly access and manipulate views of other pages. I know I am a bad searcher (probably being 70 and mind going to mush), but I cannot find any examples of this. if I use Code: Copy B4XPages. I don't see any of the public's in B4XMainPage and if I try and use Code: Copy B4XMainPage. isn't allowed Confused on how to see the public variables in B4XMainPage and how to call methods without using CallSub or CallSubDelayed. Thanks BobVal
LucaMs Expert Licensed User Longtime User Sep 20, 2020 #2 B4XPages.MainPage.AnyPublicMemberOfB4XMainPage Upvote 0
Robert Valentino Well-Known Member Licensed User Longtime User Sep 20, 2020 #3 Thanks so much Just tried this in one of my pages and B4XPages seems to be null I can use B4XPages.MainPage. to get to any variable or class. But when the code actually runs B4XPages appears to be null Last edited: Sep 20, 2020 Upvote 0
Thanks so much Just tried this in one of my pages and B4XPages seems to be null I can use B4XPages.MainPage. to get to any variable or class. But when the code actually runs B4XPages appears to be null
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2020 #4 What is the problem? The code Luca wrote is correct. If you need to access other pages: Code: Copy Dim p2 As SomeOtherPage = B4XPages.GetPage("page 2") p2.AnyPublicMemberOfSomeOtherPage(1, 2, 3) Upvote 0
What is the problem? The code Luca wrote is correct. If you need to access other pages: Code: Copy Dim p2 As SomeOtherPage = B4XPages.GetPage("page 2") p2.AnyPublicMemberOfSomeOtherPage(1, 2, 3)
LucaMs Expert Licensed User Longtime User Sep 21, 2020 #5 Erel said: If you need to access other pages: Click to expand... At the moment I did not want to "complicate" the (simple) things Robert Valentino said: But when the code actually runs B4XPages appears to be null Click to expand... Note that B4XPages is never Null, since it is a code module. Upvote 0
Erel said: If you need to access other pages: Click to expand... At the moment I did not want to "complicate" the (simple) things Robert Valentino said: But when the code actually runs B4XPages appears to be null Click to expand... Note that B4XPages is never Null, since it is a code module.
Robert Valentino Well-Known Member Licensed User Longtime User Sep 21, 2020 #6 Was getting null. Let me see if I can create a test program. Upvote 0