Mashiane Expert Licensed User Longtime User Mar 20, 2017 #1 Hi I'm a little bit stuck here.. In my class I have a method... B4X: Sub Initialize(pg As AMPage, sID As String, sTitle As String) .... End Sub I run my class and everything executes properly. I then define another method in the same class B4X: Sub InitializeFooter(pg As AMPage, sID As String) Initialize(pg,sID,"") Position = EnumHeaderPosition.bottom Mode = EnumMode.toolbar End Sub I am now getting a types do not match error in B4X: Initialize(pg,sID,"") What am I missing here? On the error log it says ',' expected before the 'types do not match' entry Thanks
Hi I'm a little bit stuck here.. In my class I have a method... B4X: Sub Initialize(pg As AMPage, sID As String, sTitle As String) .... End Sub I run my class and everything executes properly. I then define another method in the same class B4X: Sub InitializeFooter(pg As AMPage, sID As String) Initialize(pg,sID,"") Position = EnumHeaderPosition.bottom Mode = EnumMode.toolbar End Sub I am now getting a types do not match error in B4X: Initialize(pg,sID,"") What am I missing here? On the error log it says ',' expected before the 'types do not match' entry Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2017 #2 There could only be one initialize method in a class and it must be called before any other method. Upvote 0
Mashiane Expert Licensed User Longtime User Mar 20, 2017 #3 Erel said: There could only be one initialize method in a class and it must be called before any other method. Click to expand... Ohk, as soon as I change the method name to Init for example, its error free now. , b4a things... Thanks Last edited: Mar 20, 2017 Upvote 0
Erel said: There could only be one initialize method in a class and it must be called before any other method. Click to expand... Ohk, as soon as I change the method name to Init for example, its error free now. , b4a things... Thanks