iOS Question Bug in iHUD?

Moosi

Member
Licensed User
Longtime User
Hi,

I have a Problem with the ProgressDialog when it´s called from a Msgbox2

The "Download.DoDownload" starts an HttpJob.
If I press the Button1 the ProgressDialog is shown, the download starts and an Toastmessage is shown OnSuccess.
That is the way how it should work.

If I call the Download with an MessageBox Event, The ProgressDialog is hidden when the "SubmitJob" from the HttpUtils2Service is called.

Attached the Project. It would be nice if someone could confirm the bug or knows a workaround :)

thanks
moosi

B4X:
Sub Button1_Click
    StartDownload
End Sub

Sub Button2_Click
    Msgbox2("msg","Do you want to start the download?", "Question", Array("yes", "no"))
End Sub

Sub msg_Click(ButttonText As String)
    If ButttonText = "yes" Then
        StartDownload
    Else
        Log("No")  
    End If
End Sub

Sub StartDownload
        hd.ProgressDialogShow("Loading")
        Download.DoDownload
End Sub

Sub EndDownload
    hd.ProgressDialogHide
    hd.ToastMessageShow("Download finished",False)   
End Sub
 

Attachments

  • iHUDTest.zip
    4.7 KB · Views: 364

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,
or knows a workaround

use CallSubUtils and call the StartDownload sub with a delay of 400ms:


B4X:
Sub msg_Click(ButttonText As String)
    If ButttonText = "yes" Then
        csu.CallSubDelayedPlus(Me,"StartDownload",400)
    Else
        Log("No")  
    End If
End Sub

Jan
 
Upvote 0
Top