Android Question Resumable sub

ALBRECHT

Active Member
Licensed User
Hello,

Please, could you tell me why i receive that kind of symbol (like a refresh rotate arrow) added after the declare sub line:

Sub ClvLanguage_ItemClick (Position As Int, CodeLang As Object)
B4X:
Sub ClvLanguage_ItemClick (Position As Int, CodeLang As Object)◄
    Dim xui As XUI
    Dim mess As String = Tools2.GetLocalStrings("yousure")
    Dim title As String = ""
    Dim msgboxoui As String = Tools2.GetLocalStrings("msgboxoui")
    Dim msgboxno As String = Tools2.GetLocalStrings("msgboxno")
    Dim msgboxcancel As String = Tools2.GetLocalStrings("msgboxcancel")
    Dim sf As Object = xui.Msgbox2Async(mess, title, msgboxoui, msgboxcancel, msgboxno, Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Langue = CodeLang
        ToolsForms.ChangLangUser(Langue)
        Tools.LS_Init
        ClvLanguage.Clear
        Tools.Param_Init(PanelParam, ClvLanguage)
        Tools.Top_Init(PanelTop)
        Tools.Menu_Init(PanelMenu)
        Tools.Logo_Init(PanelLogo)
        Tools.User_Init(PanelUser)
    End If
End Sub

And if i could have a forum link to know in which case to use the Activity_Resume and Activity_Pause, it would be cool

Regards
Michel
 

DonManfred

Expert
Licensed User
Longtime User
Using wait for in a sub automatically makes the sub a resumeable sub

https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/#content

Quote:

Any sub with one or more calls to Sleep or Wait For is a resumable subs. The IDE shows an indicator next to the sub declaration:

SS-2017-04-19_11.05.40.png
 
Upvote 0
Top