resumable sub

  1. A

    Android Question Code in event doesn't seem to run when Wait For is used

    I have code like the following. The Wait For part works fine, and does indeed resume when the button is clicked. But the code in Button_Click never runs (ClickedButton, which a global variable, thus remains empty). Sub MainModule Do While True Wait For Button_Click...
  2. epiCode

    Android Question Wait for Response

    I am calling a sub called ShowDialog from multiple places in code. Message1 is string Variable. Intended outcome: My code should display Dialog and wait for either ok or cancel. Current scenario: Dialog is shown but code moves on to Additional Code Would be really nice if anyone can share or...
  3. epiCode

    Android Question Clarification: Resumable Subs

    Small clarification needed regarding Resumable Sub/Wait for Event consumption I have a sub called TTSCompleted which is called by a lib in main code I use the following statement Wait for TTSCompleted When the event happens "Wait for" apparently resumes but the Sub TTSCompleted is not...
  4. A

    Android Question resumablesubs and debug/release app

    Hi, I have an app with resumablesubs that crash when I compile it in release mode, but work fine if I use it compiled in debug mode ! controllo_g$ResumableSub_Leggiscriviresume (java line: 145) android.os.NetworkOnMainThreadException at...
  5. jroriz

    B4J Question [SOLVED] Sub that became resumablesub

    Well, I have (had) a simple sub that returns a value. This sub will now use the shell, so it has become a resumablesub. It so happens that I call these sub from various points in my project, and now each sub that calls this resumablesub will also become a resumablesub, forcing me to also...
  6. L

    Android Question Program does not work after migrating from B4A 9.80 to 10.70

    Hello last year I wrote a class (in B4A 9.80) that uses UDPSocket and resumable subs to learn B4X starting from my needs. I installed B4A 10.70 in a new VM and found that with the new version it doesn't work (with the old it still works). Private Sub WaitForMessageHelper (Result() As Object) As...
  7. A

    Android Question MsgboxAsync in Resumable Sub

    Hi all I'm updating my app and replace all MsgBox that are depreciated to MsgBoxAsync. I have a problem because MsgBoxAsync is not modal anymore I have a code for example Private Sub ApplyServerResponse as Boolean Dim TransferResult as String TransferResult=GetParsedResultFromJSON ' Sub that...
  8. Myr0n

    Android Question (SOLVED) - Is it possible to return more than 1 value in Resumable Subs?

    Hi everybody Is it possible to return moren than 1 value in resumable subs like Dim SenderFilter As Object = sql.ExecQueryAsync("SQL", "SELECT * FROM table1", Null) Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, rs As ResultSet) '<=== like SQL_QueryComplete if yes, how can...
  9. DavideV

    Android Question ResumableSub into Starter Service crashes?

    [SOLVED] it was my mistake. the library Su was initialized under a conditional piece of code, so it was initialized only in some cases. Moved Su.initialize in a different place and it works in starter service without problems...
Top