W wroyw Member Licensed User Feb 19, 2017 #1 Hi, I have create a class modul in my project and would like use the CallSub2 command to call a sub in the class. But what must I use for the Component parameter ? It works with main and I place the sub in my main file ... But I need it in my own class.
Hi, I have create a class modul in my project and would like use the CallSub2 command to call a sub in the class. But what must I use for the Component parameter ? It works with main and I place the sub in my main file ... But I need it in my own class.
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2017 #2 You probably don't need to use CallSub2 at all. You can call the method directly: B4X: Dim c As YourClass c.Initialize c.SomeSub 'you can use CallSub but it is not required: CallSub(c, "SomeSub") Upvote 0
You probably don't need to use CallSub2 at all. You can call the method directly: B4X: Dim c As YourClass c.Initialize c.SomeSub 'you can use CallSub but it is not required: CallSub(c, "SomeSub")
W wroyw Member Licensed User Feb 19, 2017 #3 The problem is, i will take the name from a string And the Callsub is inside the class Upvote 0