Since the instance of the handler class is not created by you, the programmer, but by B4J-jServer, I would say that Erel meant that you cannot add parameters to the Sub Initialize, which you can do with other classes.
by habit I put my initialization code in the Initialize sub.
I just read that requirement after my project is already written and seemingly running fine.
Being the Handler a class, I expect Initialize to work as usual but that line made me wonder if I was braking some rule that may backfire when least expected.
by habit I put my initialization code in the Initialize sub.
I just read that requirement after my project is already written and seemingly running fine.
Being the Handler a class, I expect Initialize to work as usual but that line made me wonder if I was braking some rule that may backfire when least expected.
I also expect it is exactly the same as what a normal class is.
I also use the Initialize sub in my web api project template to initialize some objects.
B4X:
Public Sub Initialize
HRM.Initialize
HRM.VerboseMode = Main.app.api.VerboseMode
End Sub
I think what Erel wants to bring out is the minimum boilerplate code is to have both Initialize and Handle subs inside this class.
The more important point I can see here is the Handle sub.
Since the instance of the handler class is not created by you, the programmer, but by B4J-jServer, I would say that Erel meant that you cannot add parameters to the Sub Initialize, which you can do with other classes.
Since the instance of the handler class is not created by you, the programmer, but by B4J-jServer, I would say that Erel meant that you cannot add parameters to the Sub Initialize, which you can do with other classes.