Alberto Iglesias Well-Known Member Licensed User Longtime User Feb 16, 2019 #1 In the process to share my code between this platforms, I have to know what's the best practice to create some method on a function on Code Module or b4xLib to use httpJob or other process to download, like this Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download("https://www.google.com") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release in Code Module we can't use "me" to receive the response, I'm thinking in use b4xlib, or have another best practice to create this??? thank you
In the process to share my code between this platforms, I have to know what's the best practice to create some method on a function on Code Module or b4xLib to use httpJob or other process to download, like this Code: Copy Dim j As HttpJob j.Initialize("", Me) j.Download("https://www.google.com") Wait For (j) JobDone(j As HttpJob) If j.Success Then Log(j.GetString) End If j.Release in Code Module we can't use "me" to receive the response, I'm thinking in use b4xlib, or have another best practice to create this??? thank you
DonManfred Expert Licensed User Longtime User Feb 16, 2019 #2 Alberto Iglesias said: I have to know what's the best practice to create some method on a function on Code Module Click to expand... do not use Codemodules for httpjobs. Create a class and use the Class from Services/Activities. In regard to b4i i expect the best solution is a Class which can be used in B4A/B4i (and also B4J btw). You even could create a b4xlib (which can be used in all platforms). Last edited: Feb 16, 2019 Upvote 0
Alberto Iglesias said: I have to know what's the best practice to create some method on a function on Code Module Click to expand... do not use Codemodules for httpjobs. Create a class and use the Class from Services/Activities. In regard to b4i i expect the best solution is a Class which can be used in B4A/B4i (and also B4J btw). You even could create a b4xlib (which can be used in all platforms).
Alberto Iglesias Well-Known Member Licensed User Longtime User Feb 16, 2019 #3 ok Manfred, I will do making b4xlib thabk you Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #4 I recommend starting with a shared module (not in the old shared folder). This way you can update it easily from both projects. [B4X] Modules, Files, Groups and Folders Upvote 0
I recommend starting with a shared module (not in the old shared folder). This way you can update it easily from both projects. [B4X] Modules, Files, Groups and Folders