D dcoun Member Licensed User Longtime User Jul 6, 2018 #1 Hi, I have created a class in which a CallSub sends to the calling activity a "message", ex. Code: Copy CallSub(target,"QueryDone") During initialiazation of this class: Code: Copy Public Sub Initialize(wd As Object) target=wd end sub In the calling activity the code is like the following Code: Copy Private wq As myclass wq.initialize(Me) wq.dothisjob Wait For (wq) QueryDone If Not(wq.queryOK) Then blabla The above code worked oK in both debug and release. Now it works only in release. the "QueryDone" is not received in debug release, it works on release and in release with BridgeLogger
Hi, I have created a class in which a CallSub sends to the calling activity a "message", ex. Code: Copy CallSub(target,"QueryDone") During initialiazation of this class: Code: Copy Public Sub Initialize(wd As Object) target=wd end sub In the calling activity the code is like the following Code: Copy Private wq As myclass wq.initialize(Me) wq.dothisjob Wait For (wq) QueryDone If Not(wq.queryOK) Then blabla The above code worked oK in both debug and release. Now it works only in release. the "QueryDone" is not received in debug release, it works on release and in release with BridgeLogger
XbNnX_507 Active Member Licensed User Longtime User Jul 6, 2018 #2 dcoun said: CallSub(target,"QueryDone") Click to expand... Use CallSubDelayed.
D dcoun Member Licensed User Longtime User Jul 6, 2018 #3 It worked but I can not see the reason.....
D dcoun Member Licensed User Longtime User Jul 6, 2018 #4 It is finaly due to LineageOS's last 15 version
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2018 #5 No bug here. Your code is wrong. You must use CallSubDelayed. Otherwise the sub will be called before the wait for line is reached. Note that it is better to return ResumableSub from the relevant sub. See the resumable subs video tutorial for more information.
No bug here. Your code is wrong. You must use CallSubDelayed. Otherwise the sub will be called before the wait for line is reached. Note that it is better to return ResumableSub from the relevant sub. See the resumable subs video tutorial for more information.