Android Question CallSub to Resumable Sub - Current delaration does not match previous one, result

Discussion in 'Android Questions' started by RJB, May 31, 2019.

  1. RJB

    RJB Active Member Licensed User

    With this code in a service:
    Sub Test1String As ResumableSub
    Return "String"
    End Sub
    Sub Test2Boolean As ResumableSub
    Return True
    End Sub
    This code in Main:
    Wait For(CallSub(TestService, "Test1String")) Complete (result As String)
    Wait For(CallSub(TestService, "Test2Boolean")) Complete (result As Boolean)
    "Current delaration does not match previous one.
    on the second line.

    Dim rs1 As ResumableSub = CallSub(TestService, "Test1String")
    Wait For (rs1) Complete (result As String)
    Dim rs2 As ResumableSub = CallSub(TestService, "Test2Boolean")
    Wait For (rs2) Complete (result As Boolean)
    gives the same result

    Any suggestions as to why, and how to correct it?
  2. Erel

    Erel Administrator Staff Member Licensed User

    What is the type of 'result' after these two lines?

    Wait For(CallSub(TestService, "Test1String")) Complete (result1 As String)
    Wait For(CallSub(TestService, "Test2Boolean")) Complete (result2 As Boolean)
  3. RJB

    RJB Active Member Licensed User

    I'm not sure that I understand the question but that does solve the problem - and the reason is obvious when you see it. Thanks
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice