Star-Dust Expert Licensed User Longtime User Mar 3, 2021 #1 Could an event called by a class be a sub Resumable? For example B4X: Sub Class_Event as ResumableSub Return True End Sub And could the class invoke the event and wait for completion? Something like this B4X: 'Call Event If SubExist(mCallBack,MEvent & "_Event") then Wait for (CallSub(mCallBack,MEvent & "_Event")) Complete (Success As Boolean) End If
Could an event called by a class be a sub Resumable? For example B4X: Sub Class_Event as ResumableSub Return True End Sub And could the class invoke the event and wait for completion? Something like this B4X: 'Call Event If SubExist(mCallBack,MEvent & "_Event") then Wait for (CallSub(mCallBack,MEvent & "_Event")) Complete (Success As Boolean) End If
LucaMs Expert Licensed User Longtime User Mar 3, 2021 #2 Ma che domande fai? A parte che è ovvio... prova, no? You're asking strange questions; also... try it! I don't see any problems. Upvote 0
Ma che domande fai? A parte che è ovvio... prova, no? You're asking strange questions; also... try it! I don't see any problems.
Star-Dust Expert Licensed User Longtime User Mar 3, 2021 #3 LucaMs said: Ma che domande fai? A parte che è ovvio... prova, no? You're asking strange questions; also... try it yourself ! I don't see any problems. Click to expand... in the form described it certainly doesn't work I wanted to know if there was some way to get that result. I have put the example that certainly does not work to illustrate what is the goal I want to achieve Upvote 0
LucaMs said: Ma che domande fai? A parte che è ovvio... prova, no? You're asking strange questions; also... try it yourself ! I don't see any problems. Click to expand... in the form described it certainly doesn't work I wanted to know if there was some way to get that result. I have put the example that certainly does not work to illustrate what is the goal I want to achieve
LucaMs Expert Licensed User Longtime User Mar 3, 2021 #4 Ma vuoi chiamare l'evento dall'interno della classe stessa? Se è così, devi usare Me, non Callback. Do you want to call the event routine from within the class itself? If so you have to use Me, not mCallback. EDIT. Ma nemmeno! Non mi è chiaro cosa vuoi fare; magari nel forum italiano... It is not clear to me what you want to achieve. Upvote 0
Ma vuoi chiamare l'evento dall'interno della classe stessa? Se è così, devi usare Me, non Callback. Do you want to call the event routine from within the class itself? If so you have to use Me, not mCallback. EDIT. Ma nemmeno! Non mi è chiaro cosa vuoi fare; magari nel forum italiano... It is not clear to me what you want to achieve.
Star-Dust Expert Licensed User Longtime User Mar 3, 2021 #5 LucaMs said: Ma vuoi chiamare l'evento dall'interno della classe stessa? Se è così, devi usare Me, non Callback. Do you want to call the event routine from within the class itself? If so you have to use Me, not Callback. Click to expand... What questions do you do? (You're asking strange questions) is a class that calls the event from the activity or from another class. What sense would mCallBack make. Upvote 0
LucaMs said: Ma vuoi chiamare l'evento dall'interno della classe stessa? Se è così, devi usare Me, non Callback. Do you want to call the event routine from within the class itself? If so you have to use Me, not Callback. Click to expand... What questions do you do? (You're asking strange questions) is a class that calls the event from the activity or from another class. What sense would mCallBack make.
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2021 #6 It should work. Which error have you encountered? You can make it a bit more straightforward with: B4X: Dim rs As ResumableSub = CallSub(mCallBack,MEvent & "_Event") Wait for (rs) Complete (Success As Boolean) Upvote 0
It should work. Which error have you encountered? You can make it a bit more straightforward with: B4X: Dim rs As ResumableSub = CallSub(mCallBack,MEvent & "_Event") Wait for (rs) Complete (Success As Boolean)
LucaMs Expert Licensed User Longtime User Mar 3, 2021 #7 42 minutes ago: https://www.b4x.com/android/forum/threads/chiacchiericci.63457/post-804301 but... without Upvote 0
42 minutes ago: https://www.b4x.com/android/forum/threads/chiacchiericci.63457/post-804301 but... without