David B Member Mar 5, 2017 #1 Hi ! I've been trying to do this simple task for a while . I have this piece of code in Main B4X: Sub ResponderSocket (Enviar As String) aStream.Write(Enviar.GetBytes("utf8")) End Sub Then I can call this Sub from another Module doing B4X: Main.ResponderSocket("mydata") How do I call another sub that not is in Main? I have tried typing the module name followed by dot but it does not work
Hi ! I've been trying to do this simple task for a while . I have this piece of code in Main B4X: Sub ResponderSocket (Enviar As String) aStream.Write(Enviar.GetBytes("utf8")) End Sub Then I can call this Sub from another Module doing B4X: Main.ResponderSocket("mydata") How do I call another sub that not is in Main? I have tried typing the module name followed by dot but it does not work
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2017 #2 What is the type of the other module? Is it a class module or a code module? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2017 #4 So you need to create an instance of this class first: B4X: Dim c As MyClass c.Initialize c.SomeMethod Upvote 0
So you need to create an instance of this class first: B4X: Dim c As MyClass c.Initialize c.SomeMethod