For an updater, I want to download new versions of my app with a httpSocket. Therefore I have dragged a httpSocket onto my update window. A button calls:
f=SpecialFolder.UserHome.Child("Downloads").Child("Goldfish_4-0_Macintosh.dmg")
If f<>Nil Then
DownloadSocket.Get "http://www.fishbeam.com/software/Goldfish_4-0_Macintosh.dmg", f
End If
With click on the button, a file named “Goldfish_4-0_Macintosh.dmg” is created in downloads. But no download begins. The file remains empty and no event from the httpSocket is called. No Connected, no Error, no ReceiveProgress, no DownloadComplete. Did I do something wrong? I just want to download the file “http://www.fishbeam.com/software/Goldfish_4-0_Macintosh.dmg” to the “Downloads”-folder.
You can check a demo project here. It contains only a button that starts the download. And the code “Beep” with a Breakpoint in all available httpSocket events to check if they get called. http://www.work.fishbeam.com/XojoDownloadBug.zip
to show the window on that the download socket is located. It seems that the code execution stop from .ShowModal prevents all events of httpSocket from being fired unless you call .Hide or .Close. Is this a Cocoa bug? I have altered my code so that I don’t need .ShowModal for that window anymore.
My demo project did not use .ShowModal for the window so that you could not reproduce this.