I’m trying to use the new xojo.net framework for the HTTP/1.1 support.
However a simple file download crashes when the file is complete.
This is the FileReceived handler:
[code]Sub FileReceived(URL as Text, HTTPStatus as Integer, File as xojo.IO.FolderItem)
// set the progress bar to 100%
DownloadProgress.Value = DownloadProgress.Maximum
// clear the status box
lblDName.Text = “”
MsgBox("Download is done. The file is located here: " + File.Path)
// reset for another download
DownloadButton.Enabled = True
DownloadProgress.Value = 0
End Sub
[/code]
Best I can figure is that the File parameter is empty.
Any ideas for a workaround?
A feedback report with a sample bit of code & the report would be good as the person who will probably need to review that one is not here at the moment
Already filed #39217 for this, another related one #39224 is OSX specific.
Both with sample projects.
I was hoping someone else has run into this and has a workaround.
Almost certainly, however since it is in an event handler, I would hope its scope would last at least until the end of the routine.
I’ve been banging my head against this for a few days. For example, I suspected a scope problem so I tried creating a folderitem window property to reference after the download, but that disappears, too.
I added another example project on that feedback report: A window property folderitem that disappears (goes empty) after a couple of seconds.
[quote=185575:@John A Knight, Jr]Almost certainly, however since it is in an event handler, I would hope its scope would last at least until the end of the routine.
I’ve been banging my head against this for a few days. For example, I suspected a scope problem so I tried creating a folderitem window property to reference after the download, but that disappears, too.
I added another example project on that feedback report: A window property folderitem that disappears (goes empty) after a couple of seconds.[/quote]
Yeah, it’s a bug. I don’t have any workaround for you because, like you noticed, it’s an issue in Xojo.IO.FolderItem itself on OS X.