B4J Question [WebApp] "Wait for" does not catch the mouseup event.

Omar Moreno

Member
Licensed User
Longtime User
Why "Wait for" does not catch the mouseup event of a JQueryElement object when it is passed as a parameter to a subroutine.

B4X:
Sub ModalX(divx As JQueryElement)
    '
    ...
    '
    Dim BtnClick As String = ""
    '   
    'Wait For divx_MouseUp (Params As Map)    '<<--- Why this code does not work?
    Wait For modal1_Mouseup (Params As Map) '<<--- This code does work
    '
    BtnClick = Params.Get("target")
    Log("Boton Click: " & BtnClick)
    '
 ....
    '
End Sub
 

Attachments

  • Wait for divx_MouseUp.zip
    3.2 KB · Views: 213

Omar Moreno

Member
Licensed User
Longtime User
Thanks for your reply.
The goal is to make the Sub ModalX a global subroutine in a code module to send the parameter, How could I do it ?.
 
Upvote 0

mindful

Active Member
Licensed User
You can setup the sub in the websocket class and just relay all the info to a sub in a module using CallSubDelayed or CallSub(if what you do is thread safe) along with the websocket object (if you need to send something back to the client after processing the event)
 
Upvote 0
Top