B4J Question [B4XPages] how to call sub in 3rd page ?

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Do we have full example how to call subs in pages ? Without it it's impossible to work.
Each class is inited in some one module, and ... how to update this class, if impossible to call it from some other code module or page?
Say, update screen list. MainPage can be updated, yes, but .... why other pages, if no possibility...
 

eric19740521

Member
Licensed User
Longtime User
Does this look right for you?
B4X:
CallSub (Component As Object, Sub As String) As Object
CallSub2 (Component As Object, Sub As String, Argument As Object) As Object
CallSub3 (Component As Object, Sub As String, Argument1 As Object, Argument2 As Object) As Object
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Yes, Component looks like a B4XPages.GetPage("PageID").
Solved, thanks :)
 
Upvote 0

eric19740521

Member
Licensed User
Longtime User
Maybe there is another way??
Assuming functions that use pag1...page1 needs to be public,

you can try
B4X:
Page1.Fun1
 
Upvote 0
Top