G GoodGuyOnWeb Member Jan 18, 2022 #1 I have the following sub in B4XMainPage B4X: 'In B4XMainPage Private Sub calc_leadership (TL1 As Double,CM1 As Double,IO1 As Double , PS1 As Double) As Int ....... End Sub Trying to call the sub from another page (Not sure how to pass on the 4 arguments) : B4X: CallSub2(B4XPages.MainPage,"calc_leadership",CreateMap("TL1":tllst*1.0,"CM1":cmlst*1.0,"IO1":iolst*1.0,"PS1":pslst*1.0)) Error java.lang.Exception: Sub calc_leadership signature does not match expected signature. Click to expand... Please let me know the correct code to call calc_leadership sub.
I have the following sub in B4XMainPage B4X: 'In B4XMainPage Private Sub calc_leadership (TL1 As Double,CM1 As Double,IO1 As Double , PS1 As Double) As Int ....... End Sub Trying to call the sub from another page (Not sure how to pass on the 4 arguments) : B4X: CallSub2(B4XPages.MainPage,"calc_leadership",CreateMap("TL1":tllst*1.0,"CM1":cmlst*1.0,"IO1":iolst*1.0,"PS1":pslst*1.0)) Error java.lang.Exception: Sub calc_leadership signature does not match expected signature. Click to expand... Please let me know the correct code to call calc_leadership sub.
Solution Erel Jan 18, 2022 GoodGuyOnWeb said: Please let me know the correct code to call calc_leadership sub. Click to expand... Change private to public: B4X: B4XPages.MainPage.calc_leadership(1, 2, 3, 4)
GoodGuyOnWeb said: Please let me know the correct code to call calc_leadership sub. Click to expand... Change private to public: B4X: B4XPages.MainPage.calc_leadership(1, 2, 3, 4)
Erel B4X founder Staff member Licensed User Longtime User Jan 18, 2022 #2 GoodGuyOnWeb said: Please let me know the correct code to call calc_leadership sub. Click to expand... Change private to public: B4X: B4XPages.MainPage.calc_leadership(1, 2, 3, 4) Upvote 1 Solution
GoodGuyOnWeb said: Please let me know the correct code to call calc_leadership sub. Click to expand... Change private to public: B4X: B4XPages.MainPage.calc_leadership(1, 2, 3, 4)