Android Question [B4X] Resumable Sub, CustomClass Eventi and CallSub

Star-Dust

Expert
Licensed User
Longtime User
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
 

Star-Dust

Expert
Licensed User
Longtime User
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.
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

Expert
Licensed User
Longtime User
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

Star-Dust

Expert
Licensed User
Longtime User
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.
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
Top