Android Question B4xPages : calling a sub in mainactivity from a b4xpage

I have a sub in main activity and would like to call it from a b4xpage when i am in a b4xpage i can see variables declared as public in main but not subs even if i declare them as public
 
I have a sub in main activity and would like to call it from a b4xpage when i am in a b4xpage i can see variables declared as public in main but not subs even if i declare them as public
Figured it out from strolling around the forum

B4X:
CallSub (Main,"nameofsub")

wrote the answer here for anyone else having issue with this.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Check this answer from Erel:

CallSubDelayed / CallSub should only be used if you are raising an event.



 
Upvote 0
Top