M MbedAndroid Well-Known Member Licensed User Longtime User May 26, 2021 #1 just a question why this isnt processed in the why i expected. it tried this: B4X: CallSub2("Main","DownloadAndSaveFile",Callsub2("Main","Document") This isnt working in all cases. In some cases the parameter from sub Document returns null, checking it that specific case it turns out that Document wasnt called at all, thus the parameter was null This works in all cases: B4X: Private document=CallSub("main","Document") As String CallSub2("Main","DownloadAndSaveFile",document ) just curious why the first example isnt working all the time?? Timing in the queue?
just a question why this isnt processed in the why i expected. it tried this: B4X: CallSub2("Main","DownloadAndSaveFile",Callsub2("Main","Document") This isnt working in all cases. In some cases the parameter from sub Document returns null, checking it that specific case it turns out that Document wasnt called at all, thus the parameter was null This works in all cases: B4X: Private document=CallSub("main","Document") As String CallSub2("Main","DownloadAndSaveFile",document ) just curious why the first example isnt working all the time?? Timing in the queue?
Erel B4X founder Staff member Licensed User Longtime User May 26, 2021 #2 Tip: better to write Main instead of "Main" My guess is that the target activity was paused. You can check it with IsPaused(Main). Another tip: switch to B4XPages and everything will become simpler. The pages are never paused. Upvote 0
Tip: better to write Main instead of "Main" My guess is that the target activity was paused. You can check it with IsPaused(Main). Another tip: switch to B4XPages and everything will become simpler. The pages are never paused.
tigrot Well-Known Member Licensed User Longtime User May 26, 2021 #3 Erel said: Another tip: switch to B4XPages and everything will become simpler. The pages are never paused. Click to expand... Hi where can I find a comparison between B4XPages and former handling. Thank you! Upvote 0
Erel said: Another tip: switch to B4XPages and everything will become simpler. The pages are never paused. Click to expand... Hi where can I find a comparison between B4XPages and former handling. Thank you!
M MbedAndroid Well-Known Member Licensed User Longtime User May 26, 2021 #4 Erel said: Tip: better to write Main instead of "Main" My guess is that the target activity was paused. You can check it with IsPaused(Main). Another tip: switch to B4XPages and everything will become simpler. The pages are never paused. Click to expand... B4X: Log("entry downloadmanual") If IsPaused(Main) Then Log("is paused") CallSub2(Main,"DownloadAndSaveFile",CallSub(Main,"Document")) entry downloadmanual http://www.xxxxxxxxxxxxx/null Click to expand... thus wasn't paused. Anyway, fixed in method 2. I will avoid those constructions as example 1 Upvote 0
Erel said: Tip: better to write Main instead of "Main" My guess is that the target activity was paused. You can check it with IsPaused(Main). Another tip: switch to B4XPages and everything will become simpler. The pages are never paused. Click to expand... B4X: Log("entry downloadmanual") If IsPaused(Main) Then Log("is paused") CallSub2(Main,"DownloadAndSaveFile",CallSub(Main,"Document")) entry downloadmanual http://www.xxxxxxxxxxxxx/null Click to expand... thus wasn't paused. Anyway, fixed in method 2. I will avoid those constructions as example 1
Erel B4X founder Staff member Licensed User Longtime User May 27, 2021 #5 tigrot said: Hi where can I find a comparison between B4XPages and former handling. Click to expand... [B4X] B4XPages - Cross platform and simple framework for managing multiple pages [B4X] [B4XPages] What exactly does it solve? Upvote 0
tigrot said: Hi where can I find a comparison between B4XPages and former handling. Click to expand... [B4X] B4XPages - Cross platform and simple framework for managing multiple pages [B4X] [B4XPages] What exactly does it solve?